62 uint8_t buf_check[32];
160 for (i = 0; i < 32; i++)
162 buf[i] = rand() % 256;
198 for (i = 0; i < 4; i++)
200 buf[i] = rand() % 256;
223 freq = rand() % 0x1FF;
245 mhz = 433.0f + (float)(rand() % 100) / 10.0f;
612 buf[0] = rand() % 256;
613 buf[1] = rand() % 256;
614 buf[2] = rand() % 256;
615 buf[3] = rand() % 256;
625 buf[0], buf[1], buf[2], buf[3]);
963 memcpy((uint8_t *)buf, gs_handle.conf, 10);
driver nrf905 register test header file
nrf905_address_width_t
nrf905 address width enumeration definition
uint8_t nrf905_set_output_clock(nrf905_handle_t *handle, nrf905_bool_t enable)
enable or disable the output clock
nrf905_output_clock_frequency_t
nrf905 output clock frequency enumeration definition
uint8_t nrf905_get_rx_address_width(nrf905_handle_t *handle, nrf905_address_width_t *width)
get the rx address width
uint8_t nrf905_set_frequency(nrf905_handle_t *handle, uint16_t freq)
set the frequency
uint8_t nrf905_read_conf(nrf905_handle_t *handle, uint8_t conf[10])
read the conf
uint8_t nrf905_set_tx_payload_width(nrf905_handle_t *handle, uint8_t width)
set the tx payload width
uint8_t nrf905_init(nrf905_handle_t *handle)
initialize the chip
uint8_t nrf905_get_crc_mode(nrf905_handle_t *handle, nrf905_crc_mode_t *mode)
get the crc mode
uint8_t nrf905_get_auto_retransmit(nrf905_handle_t *handle, nrf905_bool_t *enable)
get the auto retransmit status
nrf905_crystal_oscillator_frequency_t
nrf905 crystal oscillator frequency enumeration definition
uint8_t nrf905_update_conf(nrf905_handle_t *handle, uint8_t conf[10])
update the conf
uint8_t nrf905_get_rx_address(nrf905_handle_t *handle, uint8_t addr[4])
get the rx address
uint8_t nrf905_frequency_convert_to_register(nrf905_handle_t *handle, float mhz, uint16_t *reg)
convert the frequency to the register raw data
nrf905_crc_mode_t
nrf905 crc mode enumeration definition
uint8_t nrf905_set_crc_mode(nrf905_handle_t *handle, nrf905_crc_mode_t mode)
set the crc mode
uint8_t nrf905_set_pll_mode(nrf905_handle_t *handle, nrf905_pll_mode_t mode)
set the pll mode
nrf905_output_power_t
nrf905 output power enumeration definition
uint8_t nrf905_get_tx_payload_width(nrf905_handle_t *handle, uint8_t *width)
get the tx payload width
uint8_t nrf905_set_output_power(nrf905_handle_t *handle, nrf905_output_power_t output_power)
set the output power
uint8_t nrf905_set_enable(nrf905_handle_t *handle, nrf905_bool_t enable)
enable or disable the chip
struct nrf905_info_s nrf905_info_t
nrf905 information structure definition
nrf905_pll_mode_t
nrf905 pll mode enumeration definition
uint8_t nrf905_get_tx_address_width(nrf905_handle_t *handle, nrf905_address_width_t *width)
get the tx address width
uint8_t nrf905_get_tx_payload(nrf905_handle_t *handle, uint8_t *buf, uint8_t len)
get the tx payload
uint8_t nrf905_set_rx_payload_width(nrf905_handle_t *handle, uint8_t width)
set the rx payload width
uint8_t nrf905_set_power_up(nrf905_handle_t *handle, nrf905_bool_t enable)
set the power up
uint8_t nrf905_get_status(nrf905_handle_t *handle, uint8_t *status)
get the status
uint8_t nrf905_get_rx_mode(nrf905_handle_t *handle, nrf905_rx_mode_t *mode)
get the rx mode
uint8_t nrf905_get_output_power(nrf905_handle_t *handle, nrf905_output_power_t *output_power)
get the output power
uint8_t nrf905_set_rx_address_width(nrf905_handle_t *handle, nrf905_address_width_t width)
set the rx address width
uint8_t nrf905_set_crystal_oscillator_frequency(nrf905_handle_t *handle, nrf905_crystal_oscillator_frequency_t freq)
set the crystal oscillator frequency
uint8_t nrf905_set_rx_address(nrf905_handle_t *handle, uint8_t addr[4])
set the rx address
uint8_t nrf905_info(nrf905_info_t *info)
get chip's information
uint8_t nrf905_set_tx_address_width(nrf905_handle_t *handle, nrf905_address_width_t width)
set the tx address width
uint8_t nrf905_get_output_clock(nrf905_handle_t *handle, nrf905_bool_t *enable)
get the output clock status
uint8_t nrf905_set_tx_address(nrf905_handle_t *handle, uint8_t *addr, uint8_t len)
set the tx address
uint8_t nrf905_get_pll_mode(nrf905_handle_t *handle, nrf905_pll_mode_t *mode)
get the pll mode
uint8_t nrf905_set_rx_mode(nrf905_handle_t *handle, nrf905_rx_mode_t mode)
set the rx mode
uint8_t nrf905_write_conf(nrf905_handle_t *handle)
write the conf
uint8_t nrf905_frequency_convert_to_data(nrf905_handle_t *handle, uint16_t reg, float *mhz)
convert the register raw data to the frequency
uint8_t nrf905_get_tx_address(nrf905_handle_t *handle, uint8_t *addr, uint8_t len)
get the tx address
uint8_t nrf905_get_crystal_oscillator_frequency(nrf905_handle_t *handle, nrf905_crystal_oscillator_frequency_t *freq)
get the crystal oscillator frequency
uint8_t nrf905_set_auto_retransmit(nrf905_handle_t *handle, nrf905_bool_t enable)
enable or disable the auto retransmit
uint8_t nrf905_get_rx_payload_width(nrf905_handle_t *handle, uint8_t *width)
get the rx payload width
uint8_t nrf905_set_output_clock_frequency(nrf905_handle_t *handle, nrf905_output_clock_frequency_t freq)
set the output clock frequency
uint8_t nrf905_set_mode(nrf905_handle_t *handle, nrf905_mode_t mode)
set the mode
uint8_t nrf905_channel_config(nrf905_handle_t *handle, uint16_t freq, nrf905_pll_mode_t mode, nrf905_output_power_t power)
config the channel
nrf905_rx_mode_t
nrf905 rx mode enumeration definition
uint8_t nrf905_get_frequency(nrf905_handle_t *handle, uint16_t *freq)
get the frequency
struct nrf905_handle_s nrf905_handle_t
nrf905 handle structure definition
uint8_t nrf905_get_rx_payload(nrf905_handle_t *handle, uint8_t *buf, uint8_t len)
get the rx payload
uint8_t nrf905_set_crc(nrf905_handle_t *handle, nrf905_bool_t enable)
enable or disable the crc
uint8_t nrf905_deinit(nrf905_handle_t *handle)
close the chip
uint8_t nrf905_get_output_clock_frequency(nrf905_handle_t *handle, nrf905_output_clock_frequency_t *freq)
get the output clock frequency
uint8_t nrf905_set_tx_payload(nrf905_handle_t *handle, uint8_t *buf, uint8_t len)
set the tx payload
nrf905_bool_t
nrf905 bool enumeration definition
uint8_t nrf905_get_crc(nrf905_handle_t *handle, nrf905_bool_t *enable)
get the crc status
@ NRF905_ADDRESS_WIDTH_1_BYTE
@ NRF905_ADDRESS_WIDTH_4_BYTE
@ NRF905_OUTPUT_CLOCK_FREQUENCY_1MHZ
@ NRF905_OUTPUT_CLOCK_FREQUENCY_4MHZ
@ NRF905_OUTPUT_CLOCK_FREQUENCY_2MHZ
@ NRF905_OUTPUT_CLOCK_FREQUENCY_500KHZ
@ NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_12MHZ
@ NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_16MHZ
@ NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_8MHZ
@ NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_20MHZ
@ NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_4MHZ
@ NRF905_OUTPUT_POWER_6_DBM
@ NRF905_OUTPUT_POWER_NEGATIVE_2_DBM
@ NRF905_OUTPUT_POWER_10_DBM
@ NRF905_OUTPUT_POWER_NEGATIVE_10_DBM
@ NRF905_PLL_MODE_433_MHZ
@ NRF905_PLL_MODE_868_915_MHZ
@ NRF905_RX_MODE_REDUCED_POWER
uint8_t nrf905_interface_spi_deinit(void)
interface spi bus deinit
uint8_t nrf905_interface_spi_init(void)
interface spi bus init
uint8_t nrf905_interface_spi_transmit(uint8_t *tx, uint8_t *rx, uint16_t len)
interface spi bus transmit
void nrf905_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t nrf905_interface_ce_gpio_init(void)
interface ce gpio init
uint8_t nrf905_interface_spi_write(uint8_t reg, uint8_t *buf, uint16_t len)
interface spi bus write
uint8_t nrf905_interface_pwr_up_gpio_init(void)
interface pwr up gpio init
void nrf905_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t nrf905_interface_pwr_up_gpio_write(uint8_t data)
interface pwr up gpio write
uint8_t nrf905_interface_tx_en_gpio_write(uint8_t data)
interface tx en gpio write
uint8_t nrf905_interface_pwr_up_gpio_deinit(void)
interface pwr up gpio deinit
uint8_t nrf905_interface_ce_gpio_write(uint8_t data)
interface ce gpio write
uint8_t nrf905_interface_spi_read(uint8_t reg, uint8_t *buf, uint16_t len)
interface spi bus read
uint8_t nrf905_interface_tx_en_gpio_init(void)
interface tx en gpio init
uint8_t nrf905_interface_ce_gpio_deinit(void)
interface ce gpio deinit
void nrf905_interface_receive_callback(uint8_t type, uint8_t *buf, uint8_t len)
interface receive callback
uint8_t nrf905_interface_tx_en_gpio_deinit(void)
interface tx en gpio deinit
#define DRIVER_NRF905_LINK_PWR_UP_GPIO_DEINIT(HANDLE, FUC)
link pwr_up_gpio_deinit function
#define DRIVER_NRF905_LINK_SPI_INIT(HANDLE, FUC)
link spi_init function
#define DRIVER_NRF905_LINK_TX_EN_GPIO_INIT(HANDLE, FUC)
link tx_en_gpio_init function
#define DRIVER_NRF905_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_NRF905_LINK_SPI_WRITE(HANDLE, FUC)
link spi_write function
#define DRIVER_NRF905_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_NRF905_LINK_SPI_DEINIT(HANDLE, FUC)
link spi_deinit function
#define DRIVER_NRF905_LINK_SPI_READ(HANDLE, FUC)
link spi_read function
#define DRIVER_NRF905_LINK_CE_GPIO_DEINIT(HANDLE, FUC)
link ce_gpio_deinit function
#define DRIVER_NRF905_LINK_DEBUG_PEINT(HANDLE, FUC)
link debug_print function
#define DRIVER_NRF905_LINK_PWR_UP_GPIO_INIT(HANDLE, FUC)
link pwr_up_gpio_init function
#define DRIVER_NRF905_LINK_TX_EN_GPIO_DEINIT(HANDLE, FUC)
link tx_en_gpio_deinit function
#define DRIVER_NRF905_LINK_CE_GPIO_WRITE(HANDLE, FUC)
link ce_gpio_write function
#define DRIVER_NRF905_LINK_INIT(HANDLE, STRUCTURE)
initialize nrf905_handle_t structure
#define DRIVER_NRF905_LINK_TX_EN_GPIO_WRITE(HANDLE, FUC)
link tx_en_gpio_write function
#define DRIVER_NRF905_LINK_PWR_UP_GPIO_WRITE(HANDLE, FUC)
link pwr_up_gpio_write function
#define DRIVER_NRF905_LINK_SPI_TRANSMIT(HANDLE, FUC)
link spi_transmit function
#define DRIVER_NRF905_LINK_CE_GPIO_INIT(HANDLE, FUC)
link ce_gpio_init function
uint8_t nrf905_register_test(void)
register test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v