LibDriver NRF905
Loading...
Searching...
No Matches
nrf905 basic driver function

nrf905 basic driver modules More...

Collaboration diagram for nrf905 basic driver function:

Data Structures

struct  nrf905_handle_s
 nrf905 handle structure definition More...
struct  nrf905_info_s
 nrf905 information structure definition More...

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

Enumerations

enum  nrf905_bool_t { NRF905_BOOL_FALSE = 0x00 , NRF905_BOOL_TRUE = 0x01 }
 nrf905 bool enumeration definition More...
enum  nrf905_pll_mode_t { NRF905_PLL_MODE_433_MHZ = 0x00 , NRF905_PLL_MODE_868_915_MHZ = 0x01 }
 nrf905 pll mode enumeration definition More...
enum  nrf905_output_power_t { NRF905_OUTPUT_POWER_NEGATIVE_10_DBM = 0x00 , NRF905_OUTPUT_POWER_NEGATIVE_2_DBM = 0x01 , NRF905_OUTPUT_POWER_6_DBM = 0x02 , NRF905_OUTPUT_POWER_10_DBM = 0x03 }
 nrf905 output power enumeration definition More...
enum  nrf905_rx_mode_t { NRF905_RX_MODE_NORMAL = 0x00 , NRF905_RX_MODE_REDUCED_POWER = 0x01 }
 nrf905 rx mode enumeration definition More...
enum  nrf905_address_width_t { NRF905_ADDRESS_WIDTH_1_BYTE = 0x01 , NRF905_ADDRESS_WIDTH_4_BYTE = 0x04 }
 nrf905 address width enumeration definition More...
enum  nrf905_output_clock_frequency_t { NRF905_OUTPUT_CLOCK_FREQUENCY_4MHZ = 0x00 , NRF905_OUTPUT_CLOCK_FREQUENCY_2MHZ = 0x01 , NRF905_OUTPUT_CLOCK_FREQUENCY_1MHZ = 0x02 , NRF905_OUTPUT_CLOCK_FREQUENCY_500KHZ = 0x03 }
 nrf905 output clock frequency enumeration definition More...
enum  nrf905_crystal_oscillator_frequency_t {
  NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_4MHZ = 0x00 , NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_8MHZ = 0x01 , NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_12MHZ = 0x02 , NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_16MHZ = 0x03 ,
  NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_20MHZ = 0x04
}
 nrf905 crystal oscillator frequency enumeration definition More...
enum  nrf905_crc_mode_t { NRF905_CRC_MODE_8 = 0x00 , NRF905_CRC_MODE_16 = 0x01 }
 nrf905 crc mode enumeration definition More...
enum  nrf905_mode_t { NRF905_MODE_RX = 0x00 , NRF905_MODE_TX = 0x01 }
 nrf905 mode enumeration definition More...
enum  nrf905_status_t { NRF905_STATUS_AM = 0x00 , NRF905_STATUS_TX_DONE = 0x01 , NRF905_STATUS_RX_DONE = 0x02 }
 nrf905 status enumeration definition More...

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

Detailed Description

nrf905 basic driver modules

Typedef Documentation

◆ nrf905_handle_t

nrf905 handle structure definition

◆ nrf905_info_t

typedef struct nrf905_info_s nrf905_info_t

nrf905 information structure definition

Enumeration Type Documentation

◆ nrf905_address_width_t

nrf905 address width enumeration definition

Enumerator
NRF905_ADDRESS_WIDTH_1_BYTE 

1 byte tx address field width

NRF905_ADDRESS_WIDTH_4_BYTE 

4 byte tx address field width

Definition at line 100 of file driver_nrf905.h.

◆ nrf905_bool_t

nrf905 bool enumeration definition

Enumerator
NRF905_BOOL_FALSE 

disable function

NRF905_BOOL_TRUE 

enable function

Definition at line 62 of file driver_nrf905.h.

◆ nrf905_crc_mode_t

nrf905 crc mode enumeration definition

Enumerator
NRF905_CRC_MODE_8 

8 crc check bit

NRF905_CRC_MODE_16 

16 crc check bit

Definition at line 132 of file driver_nrf905.h.

◆ nrf905_crystal_oscillator_frequency_t

nrf905 crystal oscillator frequency enumeration definition

Enumerator
NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_4MHZ 

4MHz

NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_8MHZ 

8MHz

NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_12MHZ 

12MHz

NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_16MHZ 

16MHz

NRF905_CRYSTAL_OSCILLATOR_FREQUENCY_20MHZ 

20MHz

Definition at line 120 of file driver_nrf905.h.

◆ nrf905_mode_t

nrf905 mode enumeration definition

Enumerator
NRF905_MODE_RX 

rx mode

NRF905_MODE_TX 

tx mode

Definition at line 141 of file driver_nrf905.h.

◆ nrf905_output_clock_frequency_t

nrf905 output clock frequency enumeration definition

Enumerator
NRF905_OUTPUT_CLOCK_FREQUENCY_4MHZ 

4MHz

NRF905_OUTPUT_CLOCK_FREQUENCY_2MHZ 

2MHz

NRF905_OUTPUT_CLOCK_FREQUENCY_1MHZ 

1MHz

NRF905_OUTPUT_CLOCK_FREQUENCY_500KHZ 

500kHZ

Definition at line 109 of file driver_nrf905.h.

◆ nrf905_output_power_t

nrf905 output power enumeration definition

Enumerator
NRF905_OUTPUT_POWER_NEGATIVE_10_DBM 

-10dBm

NRF905_OUTPUT_POWER_NEGATIVE_2_DBM 

-2dBm

NRF905_OUTPUT_POWER_6_DBM 

+6dBm

NRF905_OUTPUT_POWER_10_DBM 

+10dBm

Definition at line 80 of file driver_nrf905.h.

◆ nrf905_pll_mode_t

nrf905 pll mode enumeration definition

Enumerator
NRF905_PLL_MODE_433_MHZ 

chip operating in 433MHz band

NRF905_PLL_MODE_868_915_MHZ 

chip operating in 868 or 915 MHz band

Definition at line 71 of file driver_nrf905.h.

◆ nrf905_rx_mode_t

nrf905 rx mode enumeration definition

Enumerator
NRF905_RX_MODE_NORMAL 

normal operation

NRF905_RX_MODE_REDUCED_POWER 

reduced power

Definition at line 91 of file driver_nrf905.h.

◆ nrf905_status_t

nrf905 status enumeration definition

Enumerator
NRF905_STATUS_AM 

address match

NRF905_STATUS_TX_DONE 

tx done

NRF905_STATUS_RX_DONE 

rx done

Definition at line 150 of file driver_nrf905.h.

Function Documentation

◆ nrf905_channel_config()

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

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]freqchip frequency config
[in]modepll mode
[in]poweroutput power
Returns
status code
  • 0 success
  • 1 channel config failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 freq is over 0x1FF
Note
0<= freq <= 0x1FF

Definition at line 982 of file driver_nrf905.c.

◆ nrf905_deinit()

uint8_t nrf905_deinit ( nrf905_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an nrf905 handle structure
Returns
status code
  • 0 success
  • 1 power down failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 spi deinit failed
  • 5 pwr up gpio deinit failed
  • 6 ce gpio deinit failed
  • 7 tx en gpio deinit failed
Note
none

Definition at line 326 of file driver_nrf905.c.

◆ nrf905_frequency_convert_to_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

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]regregister raw data
[out]*mhzpointer to a frequency buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1167 of file driver_nrf905.c.

◆ nrf905_frequency_convert_to_register()

uint8_t nrf905_frequency_convert_to_register ( nrf905_handle_t * handle,
float mhz,
uint16_t * reg )

convert the frequency to the register raw data

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]mhzfrequency
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1137 of file driver_nrf905.c.

◆ nrf905_get_auto_retransmit()

uint8_t nrf905_get_auto_retransmit ( nrf905_handle_t * handle,
nrf905_bool_t * enable )

get the auto retransmit status

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get auto retransmit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1415 of file driver_nrf905.c.

◆ nrf905_get_crc()

uint8_t nrf905_get_crc ( nrf905_handle_t * handle,
nrf905_bool_t * enable )

get the crc status

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get crc failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1963 of file driver_nrf905.c.

◆ nrf905_get_crc_mode()

uint8_t nrf905_get_crc_mode ( nrf905_handle_t * handle,
nrf905_crc_mode_t * mode )

get the crc mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*modepointer to a crc mode buffer
Returns
status code
  • 0 success
  • 1 get crc mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2025 of file driver_nrf905.c.

◆ nrf905_get_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

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*freqpointer to a crystal oscillator frequency buffer
Returns
status code
  • 0 success
  • 1 get crystal oscillator frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1901 of file driver_nrf905.c.

◆ nrf905_get_frequency()

uint8_t nrf905_get_frequency ( nrf905_handle_t * handle,
uint16_t * freq )

get the frequency

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*freqpointer to a chip frequency config buffer
Returns
status code
  • 0 success
  • 1 get frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1104 of file driver_nrf905.c.

◆ nrf905_get_output_clock()

uint8_t nrf905_get_output_clock ( nrf905_handle_t * handle,
nrf905_bool_t * enable )

get the output clock status

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get output clock failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1839 of file driver_nrf905.c.

◆ nrf905_get_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

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*freqpointer to an output clock frequency buffer
Returns
status code
  • 0 success
  • 1 get output clock frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1777 of file driver_nrf905.c.

◆ nrf905_get_output_power()

uint8_t nrf905_get_output_power ( nrf905_handle_t * handle,
nrf905_output_power_t * output_power )

get the output power

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*output_powerpointer to an output power buffer
Returns
status code
  • 0 success
  • 1 get output power failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1291 of file driver_nrf905.c.

◆ nrf905_get_pll_mode()

uint8_t nrf905_get_pll_mode ( nrf905_handle_t * handle,
nrf905_pll_mode_t * mode )

get the pll mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*modepointer to a pll mode buffer
Returns
status code
  • 0 success
  • 1 get pll mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1229 of file driver_nrf905.c.

◆ nrf905_get_rx_address()

uint8_t nrf905_get_rx_address ( nrf905_handle_t * handle,
uint8_t addr[4] )

get the rx address

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*addrpointer to a rx address
Returns
status code
  • 0 success
  • 1 get rx address failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1718 of file driver_nrf905.c.

◆ nrf905_get_rx_address_width()

uint8_t nrf905_get_rx_address_width ( nrf905_handle_t * handle,
nrf905_address_width_t * width )

get the rx address width

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*widthpointer to an address width buffer
Returns
status code
  • 0 success
  • 1 get rx address width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1477 of file driver_nrf905.c.

◆ nrf905_get_rx_mode()

uint8_t nrf905_get_rx_mode ( nrf905_handle_t * handle,
nrf905_rx_mode_t * mode )

get the rx mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*modepointer to a rx mode buffer
Returns
status code
  • 0 success
  • 1 get rx mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1353 of file driver_nrf905.c.

◆ nrf905_get_rx_payload()

uint8_t nrf905_get_rx_payload ( nrf905_handle_t * handle,
uint8_t * buf,
uint8_t len )

get the rx payload

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 get rx payload failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 32
Note
1<= len <=32

Definition at line 852 of file driver_nrf905.c.

◆ nrf905_get_rx_payload_width()

uint8_t nrf905_get_rx_payload_width ( nrf905_handle_t * handle,
uint8_t * width )

get the rx payload width

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*widthpointer to a payload width buffer
Returns
status code
  • 0 success
  • 1 get rx payload width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1603 of file driver_nrf905.c.

◆ nrf905_get_status()

uint8_t nrf905_get_status ( nrf905_handle_t * handle,
uint8_t * status )

get the status

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1027 of file driver_nrf905.c.

◆ nrf905_get_tx_address()

uint8_t nrf905_get_tx_address ( nrf905_handle_t * handle,
uint8_t * addr,
uint8_t len )

get the tx address

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*addrpointer to an address buffer
[in]lenaddress length
Returns
status code
  • 0 success
  • 1 get tx address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 4
Note
1<= len <=4

Definition at line 938 of file driver_nrf905.c.

◆ nrf905_get_tx_address_width()

uint8_t nrf905_get_tx_address_width ( nrf905_handle_t * handle,
nrf905_address_width_t * width )

get the tx address width

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*widthpointer to an address width buffer
Returns
status code
  • 0 success
  • 1 get tx address width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1539 of file driver_nrf905.c.

◆ nrf905_get_tx_payload()

uint8_t nrf905_get_tx_payload ( nrf905_handle_t * handle,
uint8_t * buf,
uint8_t len )

get the tx payload

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 get tx payload failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 32
Note
1<= len <=32

Definition at line 809 of file driver_nrf905.c.

◆ nrf905_get_tx_payload_width()

uint8_t nrf905_get_tx_payload_width ( nrf905_handle_t * handle,
uint8_t * width )

get the tx payload width

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*widthpointer to a payload width buffer
Returns
status code
  • 0 success
  • 1 get tx payload width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1664 of file driver_nrf905.c.

◆ nrf905_info()

uint8_t nrf905_info ( nrf905_info_t * info)

get chip's information

Parameters
[out]*infopointer to an nrf905 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 2106 of file driver_nrf905.c.

◆ nrf905_init()

uint8_t nrf905_init ( nrf905_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an nrf905 handle structure
Returns
status code
  • 0 success
  • 1 spi initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 pwr up gpio init failed
  • 5 ce gpio init failed
  • 6 tx en gpio init failed
Note
none

Definition at line 159 of file driver_nrf905.c.

◆ nrf905_irq_handler()

uint8_t nrf905_irq_handler ( nrf905_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to an nrf905 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 383 of file driver_nrf905.c.

◆ nrf905_read_conf()

uint8_t nrf905_read_conf ( nrf905_handle_t * handle,
uint8_t conf[10] )

read the conf

Parameters
[in]*handlepointer to an nrf905 handle structure
[out]*confpointer to a conf buffer
Returns
status code
  • 0 success
  • 1 read conf failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 702 of file driver_nrf905.c.

◆ nrf905_send()

uint8_t nrf905_send ( nrf905_handle_t * handle,
uint8_t * buf,
uint8_t len )

send data

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 send failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over conf
  • 5 send timeout
Note
none

Definition at line 579 of file driver_nrf905.c.

◆ nrf905_set_auto_retransmit()

uint8_t nrf905_set_auto_retransmit ( nrf905_handle_t * handle,
nrf905_bool_t enable )

enable or disable the auto retransmit

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set auto retransmit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1383 of file driver_nrf905.c.

◆ nrf905_set_crc()

uint8_t nrf905_set_crc ( nrf905_handle_t * handle,
nrf905_bool_t enable )

enable or disable the crc

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set crc failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1931 of file driver_nrf905.c.

◆ nrf905_set_crc_mode()

uint8_t nrf905_set_crc_mode ( nrf905_handle_t * handle,
nrf905_crc_mode_t mode )

set the crc mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]modecrc mode
Returns
status code
  • 0 success
  • 1 set crc mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1993 of file driver_nrf905.c.

◆ nrf905_set_crystal_oscillator_frequency()

uint8_t nrf905_set_crystal_oscillator_frequency ( nrf905_handle_t * handle,
nrf905_crystal_oscillator_frequency_t freq )

set the crystal oscillator frequency

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]freqcrystal oscillator frequency
Returns
status code
  • 0 success
  • 1 set crystal oscillator frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1869 of file driver_nrf905.c.

◆ nrf905_set_enable()

uint8_t nrf905_set_enable ( nrf905_handle_t * handle,
nrf905_bool_t enable )

enable or disable the chip

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set enable failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 506 of file driver_nrf905.c.

◆ nrf905_set_frequency()

uint8_t nrf905_set_frequency ( nrf905_handle_t * handle,
uint16_t freq )

set the frequency

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]freqchip frequency config
Returns
status code
  • 0 success
  • 1 set frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 freq is over 0x1FF
Note
0<= freq <= 0x1FF

Definition at line 1065 of file driver_nrf905.c.

◆ nrf905_set_mode()

uint8_t nrf905_set_mode ( nrf905_handle_t * handle,
nrf905_mode_t mode )

set the mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 540 of file driver_nrf905.c.

◆ nrf905_set_output_clock()

uint8_t nrf905_set_output_clock ( nrf905_handle_t * handle,
nrf905_bool_t enable )

enable or disable the output clock

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set output clock failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1807 of file driver_nrf905.c.

◆ nrf905_set_output_clock_frequency()

uint8_t nrf905_set_output_clock_frequency ( nrf905_handle_t * handle,
nrf905_output_clock_frequency_t freq )

set the output clock frequency

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]freqoutput clock frequency
Returns
status code
  • 0 success
  • 1 set output clock frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1745 of file driver_nrf905.c.

◆ nrf905_set_output_power()

uint8_t nrf905_set_output_power ( nrf905_handle_t * handle,
nrf905_output_power_t output_power )

set the output power

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]output_poweroutput power
Returns
status code
  • 0 success
  • 1 set output power failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1259 of file driver_nrf905.c.

◆ nrf905_set_pll_mode()

uint8_t nrf905_set_pll_mode ( nrf905_handle_t * handle,
nrf905_pll_mode_t mode )

set the pll mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]modepll mode
Returns
status code
  • 0 success
  • 1 set pll mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1197 of file driver_nrf905.c.

◆ nrf905_set_power_up()

uint8_t nrf905_set_power_up ( nrf905_handle_t * handle,
nrf905_bool_t enable )

set the power up

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set power up failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 472 of file driver_nrf905.c.

◆ nrf905_set_rx_address()

uint8_t nrf905_set_rx_address ( nrf905_handle_t * handle,
uint8_t addr[4] )

set the rx address

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]*addrpointer to a rx address
Returns
status code
  • 0 success
  • 1 set rx address failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1691 of file driver_nrf905.c.

◆ nrf905_set_rx_address_width()

uint8_t nrf905_set_rx_address_width ( nrf905_handle_t * handle,
nrf905_address_width_t width )

set the rx address width

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]widthaddress width
Returns
status code
  • 0 success
  • 1 set rx address width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1445 of file driver_nrf905.c.

◆ nrf905_set_rx_mode()

uint8_t nrf905_set_rx_mode ( nrf905_handle_t * handle,
nrf905_rx_mode_t mode )

set the rx mode

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]moderx mode
Returns
status code
  • 0 success
  • 1 set rx mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1321 of file driver_nrf905.c.

◆ nrf905_set_rx_payload_width()

uint8_t nrf905_set_rx_payload_width ( nrf905_handle_t * handle,
uint8_t width )

set the rx payload width

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]widthrx payload width
Returns
status code
  • 0 success
  • 1 set rx payload width failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 width is over 0x20
Note
1<= width <= 0x20

Definition at line 1570 of file driver_nrf905.c.

◆ nrf905_set_tx_address()

uint8_t nrf905_set_tx_address ( nrf905_handle_t * handle,
uint8_t * addr,
uint8_t len )

set the tx address

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]*addrpointer to an address buffer
[in]lenaddress length
Returns
status code
  • 0 success
  • 1 set tx address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 4
Note
1<= len <=4

Definition at line 895 of file driver_nrf905.c.

◆ nrf905_set_tx_address_width()

uint8_t nrf905_set_tx_address_width ( nrf905_handle_t * handle,
nrf905_address_width_t width )

set the tx address width

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]widthaddress width
Returns
status code
  • 0 success
  • 1 set tx address width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1507 of file driver_nrf905.c.

◆ nrf905_set_tx_payload()

uint8_t nrf905_set_tx_payload ( nrf905_handle_t * handle,
uint8_t * buf,
uint8_t len )

set the tx payload

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]*bufpointer to a data buffer
[in]lenbuffer length
Returns
status code
  • 0 success
  • 1 set tx payload failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len is over 32
Note
1<= len <=32

Definition at line 766 of file driver_nrf905.c.

◆ nrf905_set_tx_payload_width()

uint8_t nrf905_set_tx_payload_width ( nrf905_handle_t * handle,
uint8_t width )

set the tx payload width

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]widthtx payload width
Returns
status code
  • 0 success
  • 1 set tx payload width failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 width is over 0x20
Note
1<= width <= 0x20

Definition at line 1631 of file driver_nrf905.c.

◆ nrf905_update_conf()

uint8_t nrf905_update_conf ( nrf905_handle_t * handle,
uint8_t conf[10] )

update the conf

Parameters
[in]*handlepointer to an nrf905 handle structure
[in]*confpointer to a conf buffer
Returns
status code
  • 0 success
  • 1 update conf failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 737 of file driver_nrf905.c.

◆ nrf905_write_conf()

uint8_t nrf905_write_conf ( nrf905_handle_t * handle)

write the conf

Parameters
[in]*handlepointer to an nrf905 handle structure
Returns
status code
  • 0 success
  • 1 write conf failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 667 of file driver_nrf905.c.