mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
at86rf231: use radio_packet_length_t
This commit is contained in:
parent
4546c3f83c
commit
fa3d976958
@ -44,7 +44,7 @@ uint8_t at86rf231_reg_read(uint8_t addr)
|
||||
return value;
|
||||
}
|
||||
|
||||
void at86rf231_read_fifo(uint8_t *data, uint8_t length)
|
||||
void at86rf231_read_fifo(uint8_t *data, radio_packet_length_t length)
|
||||
{
|
||||
// Start the SPI transfer
|
||||
at86rf231_spi_select();
|
||||
@ -58,7 +58,7 @@ void at86rf231_read_fifo(uint8_t *data, uint8_t length)
|
||||
at86rf231_spi_unselect();
|
||||
}
|
||||
|
||||
void at86rf231_write_fifo(const uint8_t *data, uint8_t length)
|
||||
void at86rf231_write_fifo(const uint8_t *data, radio_packet_length_t length)
|
||||
{
|
||||
// Start the SPI transfer
|
||||
at86rf231_spi_select();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "at86rf231_arch.h"
|
||||
#include "at86rf231_spi.h"
|
||||
|
||||
static void at86rf231_xmit(uint8_t *data, uint8_t length);
|
||||
static void at86rf231_xmit(uint8_t *data, radio_packet_length_t length);
|
||||
static void at86rf231_gen_pkt(uint8_t *buf, at86rf231_packet_t *packet);
|
||||
|
||||
static uint8_t sequenz_nr;
|
||||
@ -66,7 +66,7 @@ int16_t at86rf231_send(at86rf231_packet_t *packet)
|
||||
return packet->length;
|
||||
}
|
||||
|
||||
static void at86rf231_xmit(uint8_t *data, uint8_t length)
|
||||
static void at86rf231_xmit(uint8_t *data, radio_packet_length_t length)
|
||||
{
|
||||
// Go to state PLL_ON
|
||||
at86rf231_reg_write(AT86RF231_REG__TRX_STATE, AT86RF231_TRX_STATE__PLL_ON);
|
||||
|
||||
@ -13,7 +13,7 @@ uint8_t at86rf231_get_status(void);
|
||||
void at86rf231_spi_select(void);
|
||||
void at86rf231_spi_unselect(void);
|
||||
|
||||
void at86rf231_spi_transfer(const uint8_t *data_out, uint8_t *data_in, uint16_t length);
|
||||
void at86rf231_spi_transfer(const uint8_t *data_out, uint8_t *data_in, radio_packet_length_t length);
|
||||
uint8_t at86rf231_spi_transfer_byte(uint8_t byte);
|
||||
|
||||
void at86rf231_init_interrupts(void);
|
||||
|
||||
@ -3,9 +3,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
uint8_t at86rf231_reg_read(uint8_t addr);
|
||||
void at86rf231_reg_write(uint8_t addr, uint8_t value);
|
||||
|
||||
void at86rf231_read_fifo(uint8_t *data, uint8_t length);
|
||||
void at86rf231_write_fifo(const uint8_t *data, uint8_t length);
|
||||
void at86rf231_read_fifo(uint8_t *data, radio_packet_length_t length);
|
||||
void at86rf231_write_fifo(const uint8_t *data, radio_packet_length_t length);
|
||||
#endif
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "radio/types.h"
|
||||
|
||||
#include "ieee802154_frame.h"
|
||||
@ -19,7 +20,7 @@
|
||||
typedef struct __attribute__((packed))
|
||||
{
|
||||
/* @{ */
|
||||
uint8_t length; /** < the length of the frame of the frame including fcs*/
|
||||
uint8_t length; /** < the length of the frame of the frame including fcs*/
|
||||
ieee802154_frame_t frame; /** < the ieee802154 frame */
|
||||
int8_t rssi; /** < the rssi value */
|
||||
uint8_t crc; /** < 1 if crc was successfull, 0 otherwise */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user