Skip to content

Commit

Permalink
keep some debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Josar committed Jul 8, 2018
1 parent 110c7ca commit aae25fe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
26 changes: 17 additions & 9 deletions drivers/at86rf2xx/at86rf2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,27 @@ void at86rf2xx_reset(at86rf2xx_t *dev)
/* enable interrupts IRQ_MASK */
at86rf2xx_reg_write(dev,
AT86RF2XX_REG__IRQ_MASK,
/* AT86RF2XX_IRQ_STATUS_MASK__AWAKE /* not*/
AT86RF2XX_IRQ_STATUS_MASK__TX_END /* std */
/* | AT86RF2XX_IRQ_STATUS_MASK__AMI /* maybe for ED/RSSI readout */
/* | AT86RF2XX_IRQ_STATUS_MASK__CCA_ED_DONE /* not */
| AT86RF2XX_IRQ_STATUS_MASK__RX_END /* std */
/* | AT86RF2XX_IRQ_STATUS_MASK__RX_START /* NEVER in Extended Op. Mode */
/* | AT86RF2XX_IRQ_STATUS_MASK__PLL_UNLOCK /* not */
/* | AT86RF2XX_IRQ_STATUS_MASK__PLL_LOCK /* not */
/* not used in spi driver */
/* AT86RF2XX_IRQ_STATUS_MASK__AWAKE */
/* used in spi driver */
AT86RF2XX_IRQ_STATUS_MASK__TX_END
/* maybe could be used for ED/RSSI readout */
/* | AT86RF2XX_IRQ_STATUS_MASK__AMI */
/* not used in spi driver */
/* | AT86RF2XX_IRQ_STATUS_MASK__CCA_ED_DONE */
| AT86RF2XX_IRQ_STATUS_MASK__RX_END
/* NEVER use in Extended Op. Mode */
/* | AT86RF2XX_IRQ_STATUS_MASK__RX_START */
/* not used in spi driver */
/* | AT86RF2XX_IRQ_STATUS_MASK__PLL_UNLOCK */
/* not used in spi driver */
/* | AT86RF2XX_IRQ_STATUS_MASK__PLL_LOCK */
);

/* enable interrupts IRQ_MASK1*/
at86rf2xx_reg_write(dev, AT86RF2XX_REG__IRQ_MASK1,
AT86RF2XX_IRQ_STATUS_MASK1__TX_START /* additional for retry counter*/
/* used for retry counter*/
AT86RF2XX_IRQ_STATUS_MASK1__TX_START
/* | AT86RF2XX_IRQ_STATUS_MASK1__MAF_0_AMI */
/* | AT86RF2XX_IRQ_STATUS_MASK1__MAF_1_AMI */
/* | AT86RF2XX_IRQ_STATUS_MASK1__MAF_2_AMI */
Expand Down
4 changes: 3 additions & 1 deletion drivers/at86rf2xx/at86rf2xx_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
if (buf == NULL) {
/* TODO Is this not a problem? Frame Buffer release */
at86rf2xx_fb_stop(dev);
DEBUG("Packet lenght: %d\n", pkt_len);
printf("Packet lenght: %d\n", pkt_len);
printf("[at86rf2xx] status 0x%02x \n", *AT86RF2XX_REG__TRX_STATUS & AT86RF2XX_TRX_STATUS_MASK__TRX_STATUS );
return pkt_len;
}
/* not enough space in buf */
Expand Down Expand Up @@ -262,6 +263,7 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)

static int _set_state(at86rf2xx_t *dev, netopt_state_t state)
{
printf("[at86rf2xx] _set_state: 0x%02x", state);
switch (state) {
case NETOPT_STATE_STANDBY:
at86rf2xx_set_state(dev, AT86RF2XX_STATE_TRX_OFF);
Expand Down

0 comments on commit aae25fe

Please sign in to comment.