small cleanup.
This commit is contained in:
parent
2d5f331b34
commit
2288cdecbb
1 changed files with 2 additions and 9 deletions
|
@ -103,14 +103,14 @@ const struct radio_driver cc1020_driver =
|
||||||
cc1020_off
|
cc1020_off
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PROCESS(cc1020_receiver_process, "CC1020 receiver");
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dma_callback(void)
|
dma_callback(void)
|
||||||
{
|
{
|
||||||
dma_done = 1;
|
dma_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
PROCESS(cc1020_receiver_process, "CC1020 receiver");
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cc1020_init(const uint8_t *config)
|
cc1020_init(const uint8_t *config)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,6 @@ cc1020_set_rx(void)
|
||||||
|
|
||||||
// configure driver
|
// configure driver
|
||||||
cc1020_rxlen = 0; // receive buffer position to start
|
cc1020_rxlen = 0; // receive buffer position to start
|
||||||
//cc1020_rxstate = CC1020_RX_SEARCHING; // rx state machine to searching mode
|
|
||||||
CC1020_SET_OPSTATE(CC1020_RX | CC1020_RX_SEARCHING); // driver state to receive mode
|
CC1020_SET_OPSTATE(CC1020_RX | CC1020_RX_SEARCHING); // driver state to receive mode
|
||||||
|
|
||||||
// configure radio
|
// configure radio
|
||||||
|
@ -225,12 +224,6 @@ cc1020_send(const void *buf, unsigned short len)
|
||||||
if (len > CC1020_BUFFERSIZE)
|
if (len > CC1020_BUFFERSIZE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Previous data hasn't been sent yet. */
|
|
||||||
if (cc1020_txlen > 0) {
|
|
||||||
printf("data in buffer");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The preamble and the sync word are already in buffer. */
|
/* The preamble and the sync word are already in buffer. */
|
||||||
cc1020_txlen = PREAMBLESIZE + SYNCWDSIZE;
|
cc1020_txlen = PREAMBLESIZE + SYNCWDSIZE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue