os/services/testbed/testbed.c
static uint8_t
pop(uint8_t **dest, uint8_t *len)
{
  if(tb_rx_fifo_pos == 0) {
    LOG_ERR("E2-R FIFO FULL!\n");
    return 0;
  }
  *len = tb_msg_len;
  tb_rx_fifo_pos--;
  LOG_DBG("E2-R-- %u\n", tb_rx_fifo_pos);
  // avoid doing memcpy (faster)
  *dest = (uint8_t*) &tb_rx_fifo[tb_rx_fifo_pos];
  return tb_rx_fifo_pos + 1;
}
/*---------------------------------------------------------------------------*/
// Pop a packet for transmission from the testbed EEPROM
Pop a packet for transmission from the testbed EEPROM
Pop a packet for transmission from the testbed EEPROM
static uint8_t
pop(uint8_t **dest, uint8_t *len)
{
  if(tb_rx_fifo_pos == 0) {
    LOG_ERR("E2-R FIFO FULL!\n");
    return 0;
  }
  *len = tb_msg_len;
  tb_rx_fifo_pos--;
  LOG_DBG("E2-R-- %u\n", tb_rx_fifo_pos);
  *dest = (uint8_t*) &tb_rx_fifo[tb_rx_fifo_pos];
  return tb_rx_fifo_pos + 1;
}
static uint8_t pop ( uint8_t * * dest , uint8_t * len ) { if ( tb_rx_fifo_pos == 0 ) { LOG_ERR ( " \n " ) ; return 0 ; } * len = tb_msg_len ; tb_rx_fifo_pos -- ; LOG_DBG ( " \n " , tb_rx_fifo_pos ) ; * dest = ( uint8_t * ) & tb_rx_fifo [ tb_rx_fifo_pos ] ; return tb_rx_fifo_pos + 1 ; }
Pop a packet for transmission from the testbed EEPROM
Pop a packet for transmission from the testbed EEPROM
// avoid doing memcpy (faster)