![]() |
LibDriver NRF905
|
driver nrf905 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | nrf905_handle_s |
| nrf905 handle structure definition More... | |
| struct | nrf905_info_s |
| nrf905 information structure definition More... | |
Macros | |
| #define | DRIVER_NRF905_LINK_INIT(HANDLE, STRUCTURE) |
| initialize nrf905_handle_t structure | |
| #define | DRIVER_NRF905_LINK_SPI_INIT(HANDLE, FUC) |
| link spi_init 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_SPI_WRITE(HANDLE, FUC) |
| link spi_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 | |
| #define | DRIVER_NRF905_LINK_CE_GPIO_DEINIT(HANDLE, FUC) |
| link ce_gpio_deinit function | |
| #define | DRIVER_NRF905_LINK_CE_GPIO_WRITE(HANDLE, FUC) |
| link ce_gpio_write function | |
| #define | DRIVER_NRF905_LINK_TX_EN_GPIO_INIT(HANDLE, FUC) |
| link tx_en_gpio_init function | |
| #define | DRIVER_NRF905_LINK_TX_EN_GPIO_DEINIT(HANDLE, FUC) |
| link tx_en_gpio_deinit function | |
| #define | DRIVER_NRF905_LINK_TX_EN_GPIO_WRITE(HANDLE, FUC) |
| link tx_en_gpio_write function | |
| #define | DRIVER_NRF905_LINK_PWR_UP_GPIO_INIT(HANDLE, FUC) |
| link pwr_up_gpio_init function | |
| #define | DRIVER_NRF905_LINK_PWR_UP_GPIO_DEINIT(HANDLE, FUC) |
| link pwr_up_gpio_deinit function | |
| #define | DRIVER_NRF905_LINK_PWR_UP_GPIO_WRITE(HANDLE, FUC) |
| link pwr_up_gpio_write function | |
| #define | DRIVER_NRF905_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_NRF905_LINK_DEBUG_PEINT(HANDLE, FUC) |
| link debug_print function | |
| #define | DRIVER_NRF905_LINK_RECEIVE_CALLBACK(HANDLE, FUC) |
| link receive_callback function | |
Typedefs | |
| typedef struct nrf905_handle_s | nrf905_handle_t |
| nrf905 handle structure definition | |
| typedef struct nrf905_info_s | nrf905_info_t |
| nrf905 information structure definition | |
Functions | |
| uint8_t | nrf905_info (nrf905_info_t *info) |
| get chip's information | |
| uint8_t | nrf905_irq_handler (nrf905_handle_t *handle) |
| irq handler | |
| uint8_t | nrf905_init (nrf905_handle_t *handle) |
| initialize the chip | |
| uint8_t | nrf905_deinit (nrf905_handle_t *handle) |
| close the chip | |
| uint8_t | nrf905_set_power_up (nrf905_handle_t *handle, nrf905_bool_t enable) |
| set the power up | |
| uint8_t | nrf905_set_enable (nrf905_handle_t *handle, nrf905_bool_t enable) |
| enable or disable the chip | |
| uint8_t | nrf905_set_mode (nrf905_handle_t *handle, nrf905_mode_t mode) |
| set the mode | |
| uint8_t | nrf905_send (nrf905_handle_t *handle, uint8_t *buf, uint8_t len) |
| send data | |
| uint8_t | nrf905_write_conf (nrf905_handle_t *handle) |
| write the conf | |
| uint8_t | nrf905_read_conf (nrf905_handle_t *handle, uint8_t conf[10]) |
| read the conf | |
| uint8_t | nrf905_update_conf (nrf905_handle_t *handle, uint8_t conf[10]) |
| update the conf | |
| uint8_t | nrf905_set_tx_payload (nrf905_handle_t *handle, uint8_t *buf, uint8_t len) |
| set the tx payload | |
| uint8_t | nrf905_get_tx_payload (nrf905_handle_t *handle, uint8_t *buf, uint8_t len) |
| get the tx payload | |
| uint8_t | nrf905_get_rx_payload (nrf905_handle_t *handle, uint8_t *buf, uint8_t len) |
| get the rx payload | |
| uint8_t | nrf905_set_tx_address (nrf905_handle_t *handle, uint8_t *addr, uint8_t len) |
| set the tx address | |
| uint8_t | nrf905_get_tx_address (nrf905_handle_t *handle, uint8_t *addr, uint8_t len) |
| get the tx address | |
| 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 | |
| uint8_t | nrf905_get_status (nrf905_handle_t *handle, uint8_t *status) |
| get the status | |
| uint8_t | nrf905_set_frequency (nrf905_handle_t *handle, uint16_t freq) |
| set the frequency | |
| uint8_t | nrf905_get_frequency (nrf905_handle_t *handle, uint16_t *freq) |
| get the frequency | |
| uint8_t | nrf905_frequency_convert_to_register (nrf905_handle_t *handle, float mhz, uint16_t *reg) |
| convert the frequency to the register raw data | |
| 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_set_pll_mode (nrf905_handle_t *handle, nrf905_pll_mode_t mode) |
| set the pll mode | |
| uint8_t | nrf905_get_pll_mode (nrf905_handle_t *handle, nrf905_pll_mode_t *mode) |
| get the pll mode | |
| uint8_t | nrf905_set_output_power (nrf905_handle_t *handle, nrf905_output_power_t output_power) |
| set the output power | |
| 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_mode (nrf905_handle_t *handle, nrf905_rx_mode_t mode) |
| set the rx mode | |
| uint8_t | nrf905_get_rx_mode (nrf905_handle_t *handle, nrf905_rx_mode_t *mode) |
| get the rx mode | |
| uint8_t | nrf905_set_auto_retransmit (nrf905_handle_t *handle, nrf905_bool_t enable) |
| enable or disable the auto retransmit | |
| uint8_t | nrf905_get_auto_retransmit (nrf905_handle_t *handle, nrf905_bool_t *enable) |
| get the auto retransmit status | |
| uint8_t | nrf905_set_rx_address_width (nrf905_handle_t *handle, nrf905_address_width_t width) |
| set the rx address width | |
| 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_tx_address_width (nrf905_handle_t *handle, nrf905_address_width_t width) |
| set the tx address width | |
| uint8_t | nrf905_get_tx_address_width (nrf905_handle_t *handle, nrf905_address_width_t *width) |
| get the tx address width | |
| uint8_t | nrf905_set_rx_payload_width (nrf905_handle_t *handle, uint8_t width) |
| set the rx payload width | |
| uint8_t | nrf905_get_rx_payload_width (nrf905_handle_t *handle, uint8_t *width) |
| get the rx payload width | |
| uint8_t | nrf905_set_tx_payload_width (nrf905_handle_t *handle, uint8_t width) |
| set the tx payload width | |
| uint8_t | nrf905_get_tx_payload_width (nrf905_handle_t *handle, uint8_t *width) |
| get the tx payload width | |
| uint8_t | nrf905_set_rx_address (nrf905_handle_t *handle, uint8_t addr[4]) |
| set the rx address | |
| uint8_t | nrf905_get_rx_address (nrf905_handle_t *handle, uint8_t addr[4]) |
| get the rx address | |
| 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_get_output_clock_frequency (nrf905_handle_t *handle, nrf905_output_clock_frequency_t *freq) |
| get the output clock frequency | |
| uint8_t | nrf905_set_output_clock (nrf905_handle_t *handle, nrf905_bool_t enable) |
| enable or disable the output clock | |
| uint8_t | nrf905_get_output_clock (nrf905_handle_t *handle, nrf905_bool_t *enable) |
| get the output clock status | |
| 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_get_crystal_oscillator_frequency (nrf905_handle_t *handle, nrf905_crystal_oscillator_frequency_t *freq) |
| get the crystal oscillator frequency | |
| uint8_t | nrf905_set_crc (nrf905_handle_t *handle, nrf905_bool_t enable) |
| enable or disable the crc | |
| uint8_t | nrf905_get_crc (nrf905_handle_t *handle, nrf905_bool_t *enable) |
| get the crc status | |
| uint8_t | nrf905_set_crc_mode (nrf905_handle_t *handle, nrf905_crc_mode_t mode) |
| set the crc mode | |
| uint8_t | nrf905_get_crc_mode (nrf905_handle_t *handle, nrf905_crc_mode_t *mode) |
| get the crc mode | |
| uint8_t | nrf905_set_reg (nrf905_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | nrf905_get_reg (nrf905_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver nrf905 header file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2022/03/31 | 1.0 | Shifeng Li | first upload |
Definition in file driver_nrf905.h.