Exemplo n.º 1
0
static void
flushrx(void)
{
  uint8_t dummy;

  CC2420_READ_FIFO_BYTE(dummy);
  CC2420_STROBE(CC2420_SFLUSHRX);
  CC2420_STROBE(CC2420_SFLUSHRX);
}
Exemplo n.º 2
0
/* Encrypt at most 16 bytes of data. */
static void
cipher16(uint8_t *data, int len)
{
    uint8_t status;

    len = MIN(len, MAX_DATALEN);

    CC2420_WRITE_RAM(data, CC2420RAM_SABUF, len);
    CC2420_STROBE(CC2420_SAES);
    /* Wait for the encryption to finish */
    do {
        CC2420_GET_STATUS(status);
    } while(status & BV(CC2420_ENC_BUSY));
    CC2420_READ_RAM(data, CC2420RAM_SABUF, len);
}
Exemplo n.º 3
0
/*---------------------------------------------------------------------------*/
static void
strobe(enum cc2420_register regname)
{
  CC2420_STROBE(regname);
}