Ejemplo n.º 1
0
void chb_init()
{
    memset(&pcb, 0, sizeof(pcb_t));
    pcb.src_addr = chb_get_short_addr();
    chb_drvr_init();
	radio_msg_received_int_enable();
}
Ejemplo n.º 2
0
void chb_init()
{
    memset(&pcb, 0, sizeof(pcb_t));
    pcb.src_addr = chb_get_short_addr();

    // if SPI slave select pin is input, enable internal pullup on it.
    // otherwise it will constantly fall into spi slave mode and hang everything.
    // if not input, leave it alone.
    if (!(DDRB & (1<<DDB2)))
    {
        MCUCR &= ~(1<<PUD);
        PORTB |= (1<<PORTB2);
    }

    chb_drvr_init();
}
Ejemplo n.º 3
0
void chb_init()
{
    memset(&pcb, 0, sizeof(pcb_t));
    pcb.src_addr = chb_get_short_addr();

    // reset prev_seq and prev_src_addr to default values
    // there's a problem if the radio gets re-initialized since no initializing the prev_seq and 
    // prev_src_addr will result in a bug where the data could get flagged as a dupe
    prev_seq = 0xFF;
    prev_src_addr = 0xFFFE; 

    // if SPI slave select pin is input, enable internal pullup on it.
    // otherwise it will constantly fall into spi slave mode and hang everything.
    // if not input, leave it alone.
    if (!(DDRB & (1<<DDB2)))
    {
        MCUCR &= ~(1<<PUD);
        PORTB |= (1<<PORTB2);
    }

    chb_drvr_init();
}
Ejemplo n.º 4
0
void chb_init()
{
    memset(&pcb, 0, sizeof(pcb_t));
    pcb.src_addr = chb_get_short_addr();
    chb_drvr_init();
}