Merge remote branch 'libmc1322x/master'

Conflicts:
	cpu/mc1322x/src/default_lowlevel.c
This commit is contained in:
Mariano Alvira 2011-05-14 21:19:47 -04:00
commit 724bcbd2d3
8 changed files with 28 additions and 5 deletions

View File

@ -36,6 +36,10 @@
#ifndef BOARD_FREESCALE_NCB_H
#define BOARD_FREESCALE_NCB_H
#define GPIO_LED_RED GPIO_23
#define GPIO_LED_GREEN GPIO_24
#define GPIO_LED_BLUE GPIO_25
#define LED_RED 23
#define LED_GREEN 24
#define LED_BLUE 25

View File

@ -55,6 +55,10 @@
#define BUTTON2_OUT (0x1ULL << 22)
#define BUTTON2_IN (0x1ULL << 26)
#define GPIO_LED_RED GPIO_12
#define GPIO_LED_GREEN GPIO_21
#define GPIO_LED_BLUE GPIO_35
#define LED_RED 12
#define LED_GREEN 21
#define LED_BLUE 35

View File

@ -36,6 +36,10 @@
#ifndef BOARD_REDBEE_DEV_H
#define BOARD_REDBEE_DEV_H
#define GPIO_LED_RED GPIO_23
#define GPIO_LED_GREEN GPIO_24
#define GPIO_LED_BLUE GPIO_25
#define LED_RED 23
#define LED_GREEN 24
#define LED_BLUE 25

View File

@ -36,6 +36,10 @@
#ifndef BOARD_REDBEE_R1_H
#define BOARD_REDBEE_R1_H
#define GPIO_LED_RED GPIO_08
#define GPIO_LED_GREEN GPIO_09
#define GPIO_LED_BLUE GPIO_10
#define LED_RED 8
#define LED_GREEN 9
#define LED_BLUE 10

View File

@ -36,6 +36,10 @@
#ifndef BOARD_REDBEE_USB_H
#define BOARD_REDBEE_USB_H
#define GPIO_LED_RED GPIO_23
#define GPIO_LED_GREEN GPIO_24
#define GPIO_LED_BLUE GPIO_25
#define LED_RED 23
#define LED_GREEN 24
#define LED_BLUE 25

View File

@ -650,7 +650,7 @@ void maca_isr(void) {
dma_rx->rx_time = *MACA_TIMESTAMP;
/* check if received packet needs an ack */
if(dma_rx->data[1] & 0x20) {
if(prm_mode == AUTOACK && (dma_rx->data[1] & 0x20)) {
/* this wait is necessary to auto-ack */
volatile uint32_t wait_clk;
wait_clk = *MACA_CLK + 200;

View File

@ -78,11 +78,14 @@ void uart1_init(uint16_t inc, uint16_t mod, uint8_t samp) {
if(samp == UCON_SAMP_16X)
set_bit(*UART1_UCON,UCON_SAMP);
*GPIO_FUNC_SEL0 = ( (0x01 << (14*2)) | (0x01 << (15*2)) ); /* set GPIO15-14 to UART (UART1 TX and RX)*/
/* set GPIO15-14 to UART (UART1 TX and RX)*/
GPIO->FUNC_SEL.GPIO_14 = 1;
GPIO->FUNC_SEL.GPIO_15 = 1;
/* interrupt when there are this number or more bytes free in the TX buffer*/
*UART1_UTXCON = 16;
u1_tx_head = 0; u1_tx_tail = 0;
u1_tx_head = 0; u1_tx_tail = 0;
/* enable UART1 interrupts in the interrupt controller */
enable_irq(UART1);

View File

@ -127,8 +127,8 @@ while(1) {
my $i = 1;
while(read(FILE, $c, 1)) {
$i++;
usleep($first_delay) if ( $s == 0 );
usleep($second_delay) if ( $s == 1 );
usleep($first_delay) if ( $s == 0 ) && ($first_delay != 0);
usleep($second_delay) if ( $s == 1 ) && ($second_delay != 0);
$ob->write($c);
}
}