max4146x_comp
MAX4146X< REG > Class Template Reference
Base Class for All Maxim Max4146x RF Transmitters. More...
#include <Max4146x.h>
Public Types | |
enum | xoclkdelay_t { XOCLKDELAY_0_CYCLE, XOCLKDELAY_16_CYCLE, XOCLKDELAY_32_CYCLE, XOCLKDELAY_64_CYCLE } |
Register Configuration. More... | |
enum | xoclkdiv_t { XOCLKDIV_BY_4, XOCLKDIV_BY_5, XOCLKDIV_BY_6, XOCLKDIV_BY_7 } |
Register Configuration. More... | |
enum | fskshape_t { FSKSHAPE_DISABLE, FSKSHAPE_ENABLE } |
Register Configuration. More... | |
enum | sync_t { SYNC_0, SYNC_1 } |
Register Configuration. More... | |
enum | modmode_t { MODMODE_ASK, MODMODE_FSK } |
Register Configuration. More... | |
enum | clkout_delay_t { CLKOUT_DELAY_64_CYCLE, CLKOUT_DELAY_128_CYCLE, CLKOUT_DELAY_256_CYCLE, CLKOUT_DELAY_512_CYCLE } |
Register Configuration. More... | |
enum | bclk_postdiv_t { BCLK_POSTDIV_RESERVED_0, BCLK_POSTDIV_BY_1, BCLK_POSTDIV_BY_2, BCLK_POSTDIV_BY_3, BCLK_POSTDIV_BY_4, BCLK_POSTDIV_BY_5, BCLK_POSTDIV_RESERVED_6, BCLK_POSTDIV_RESERVED_7 } |
Register Configuration. More... | |
enum | pwdn_mode_t { PWDN_MODE_SHUTDOWN, PWDN_MODE_STANDBY, PWDN_MODE_FAST_WAKEUP, PWDN_MODE_REVERT_TO_FAST_WAKEUP } |
Register Configuration. More... | |
enum | pa_boost_t { PA_BOOST_NORMAL_MODE, PA_BOOST_BOOST_MODE } |
Register Configuration. More... | |
enum | papwr_t { PAPWR_1_DRIVER, PAPWR_2_DRIVER, PAPWR_3_DRIVER, PAPWR_4_DRIVER, PAPWR_5_DRIVER, PAPWR_6_DRIVER, PAPWR_7_DRIVER, PAPWR_8_DRIVER } |
Register Configuration. More... | |
enum | pacap_t |
Register Configuration. More... | |
enum | cplin_t { CPLIN_NO_EXTRA_CURRENT, CPLIN_CHARGE_PUMP_CURRENT_5_PERCENT, CPLIN_CHARGE_PUMP_CURRENT_10_PERCENT, CPLIN_CHARGE_PUMP_CURRENT_15_PERCENT } |
Register Configuration. More... | |
enum | fracmode_t { FRACMODE_INTEGER_N, RACMODE_FRACTIONAL_N } |
Register Configuration. More... | |
enum | lodiv_t { LODIV_DISABLED, LODIV_DIVIDE_BY_4, LODIV_DIVIDE_BY_8, LODIV_DIVIDE_BY_12 } |
enum | lomode_t { LOMODE_RING_OSCILLATOR, LOMODE_LC_VCO } |
Register Configuration. More... | |
enum | cpval_t { CPVAL_5_UA, CPVAL_10_UA, CPVAL_15_UA, CPVAL_20_UA } |
Register Configuration. More... | |
enum | i2c_txen1_t { I2C_TXEN1_DISABLE, I2C_TXEN1_ENABLE } |
Register Configuration. More... | |
enum | spi_txen1_t { SPI_TXEN1_DISABLE, SPI_TXEN1_ENABLE } |
Register Configuration. More... | |
enum | fourwire1_t { FOURWIRE1_READBACK_DISABLE, FOURWIRE1_READBACK_ENABLE } |
Register Configuration. More... | |
enum | i2c_txen2_t { I2C_TXEN2_DISABLE, I2C_TXEN2_ENABLE } |
Register Configuration. More... | |
enum | spi_txen2_t { SPI_TXEN2_DISABLE, SPI_TXEN2_ENABLE } |
Register Configuration. More... | |
enum | fourwire2_t { FOURWIRE2_READBACK_DISABLE, FOURWIRE2_READBACK_ENABLE } |
Register Configuration. More... | |
enum | pktlen_mode_t { PKTLEN_MODE_SET_LENGTH, PKTLEN_MODE_NO_SET_LENGTH } |
Register Configuration. More... | |
enum | softreset_t { SOFTRESET_DEASSERT, SOFTRESET_RESET } |
Register Configuration. More... | |
enum | operation_mode_t |
Operation state of the rf transmitter. More... | |
Public Member Functions | |
int | set_xoclkdelay (xoclkdelay_t delay) |
Set start delay before enabling XO clock to digital block. | |
int | get_xoclkdelay (xoclkdelay_t *delay) |
Get start delay before enabling XO clock to digital block. | |
int | set_xoclkdiv (xoclkdiv_t div) |
Set XO clock division ratio for digital block. | |
int | get_xoclkdiv (xoclkdiv_t *div) |
Get XO clock division ratio for digital block. | |
int | set_fskshape (fskshape_t shape) |
Sets the state of FSK Gaussian Shaping. | |
int | get_fskshape (fskshape_t *shape) |
Gets the state of FSK Gaussian Shaping. | |
int | set_sync (sync_t state) |
Sets the state of clock pin. | |
int | get_sync (sync_t *state) |
Gets the state of clock pin. | |
int | set_modmode (modmode_t mode) |
Sets modulator mode to ASK or FSK. | |
int | get_modmode (modmode_t *mode) |
Gets modulator mode. | |
int | set_clkout_delay (clkout_delay_t delay) |
Sets clkout delay. | |
int | get_clkout_delay (clkout_delay_t *delay) |
Gets clkout delay. | |
int | set_bclk_postdiv (bclk_postdiv_t div) |
Sets baud clock post-divider. | |
int | get_bclk_postdiv (bclk_postdiv_t *div) |
Gets baud clock post-divider. | |
int | set_pwdn_mode (pwdn_mode_t pwdn_mode) |
Sets power down mode. | |
int | get_pwdn_mode (pwdn_mode_t *pwdn_mode) |
Gets power down mode. | |
int | set_pa_boost (pa_boost_t pa_boost) |
enable/disable boost mode | |
int | get_pa_boost (pa_boost_t *pa_boost) |
Gets boost mode. | |
int | set_papwr (papwr_t papwr) |
set PA output power by enabling parallel drivers | |
int | get_papwr (papwr_t *papwr) |
Gets PA output power. | |
int | set_pacap (pacap_t pacap) |
set shunt capacitance value | |
int | get_pacap (pacap_t *pacap) |
Gets shunt capacitance value. | |
int | set_cplin (cplin_t cplin) |
set level of charge pump offset current | |
int | get_cplin (cplin_t *cplin) |
Gets level of charge pump offset current. | |
int | set_fracmode (fracmode_t fracmode) |
set PLL mode | |
int | get_fracmode (fracmode_t *fracmode) |
Gets PLL mode. | |
int | set_lodiv (lodiv_t lodiv) |
set divider of LC VCO | |
int | get_lodiv (lodiv_t *lodiv) |
Gets divider of LC VCO. | |
int | set_lomode (lomode_t lomode) |
set LO generation | |
int | get_lomode (lomode_t *lomode) |
Gets LO generation. | |
int | set_cpval (cpval_t cpval) |
set charge pump current | |
int | get_cpval (cpval_t *cpval) |
Gets charge pump current. | |
int | set_pktlen_mode (pktlen_mode_t pktlen_mode) |
set packet length | |
int | get_pktlen_mode (pktlen_mode_t *pktlen_mode) |
Gets packet length. | |
int | set_softreset (softreset_t softreset) |
set softreset bit | |
int | get_fifo_flags (uint8_t *fifo_flags) |
get fifo flags (I2C6) Read only | |
int | get_pktcomplete (uint8_t *pktcomplete) |
get pktcomplete bit field flags (I2C4) Read only | |
int | get_tx_pktlen (uint16_t *pktlen) |
get packet length of transmitted packet | |
int | read_register (uint8_t reg, uint8_t *value, uint8_t len) |
Read from a register. | |
int | write_register (uint8_t reg, const uint8_t *value, uint8_t len) |
Write to a register. | |
int | initial_programming (void) |
Initial programming steps after power on or soft reset. | |
int | set_bclk_prediv (uint8_t prediv) |
Set Baud clock predivision ratio. | |
int | get_bclk_prediv (uint8_t *prediv) |
Gets Baud clock predivision ratio. | |
int | set_tstep (uint8_t tstep) |
Controls GFSK shaping. | |
int | get_tstep (uint8_t *tstep) |
Gets tstep. | |
int | set_frequency (uint32_t freq) |
Set PLL frequency. | |
int | get_frequency (uint32_t *freq) |
Gets PLL frequency. | |
int | set_deltaf (uint8_t deltaf) |
Set frequency deviation from the space frequency for the mark frequency. | |
int | get_deltaf (uint8_t *deltaf) |
Get frequency deviation from the space frequency for the mark frequency. | |
int | set_deltaf_shape (uint8_t deltaf_shape) |
Set frequency deviation from the space frequency for the mark frequency. | |
int | get_deltaf_shape (uint8_t *deltaf_shape) |
Gets frequency deviation from the space frequency for the mark frequency. | |
int | set_i2c_pktlen (uint16_t pktlen) |
Set Packet Length for I2C communication. | |
int | get_i2c_pktlen (uint16_t *pktlen) |
Gets Packet Length for I2C communication. | |
int | adjust_baudrate (float rate) |
Adjust baud rate. | |
float | get_baudrate () |
Gets baud rate. | |
int | adjust_manchester_bitrate (char rate) |
Adjust Manchester Bitrate. | |
char | get_manchester_bitrate () |
Get Manchester Bitrate. | |
int | set_crystal_frequency (float freq) |
Configures the crystal frequency of the chip (Fxtal) | |
float | get_crystal_frequency () |
Get the crystal frequency of the chip (Fxtal) | |
int | set_center_frequency (float freq) |
Adjust center/carrier frequency of the chip. | |
float | get_center_frequency () |
Gets center/carrier frequency of the chip. | |
int | adjust_frequency_deviation (float deviation) |
set the FSK deviation values (Delta_f) | |
int | send_data (uint8_t *data, uint32_t length) |
Send data for selected Preset/I2C/SPI mode. |
Detailed Description
template<class REG>
class MAX4146X< REG >
Base Class for All Maxim Max4146x RF Transmitters.
The MAX4146X is a UHF sub-GHz ISM/SRD transmitter
Definition at line 52 of file Max4146x.h.
Member Enumeration Documentation
enum bclk_postdiv_t |
Register Configuration.
- Register : CFG2(0x01)
- Bit Fields : [2:0]
- Default : 0x1
- Description : Baud clock post-divider setting.
- Enumerator:
Definition at line 336 of file Max4146x.h.
enum clkout_delay_t |
Register Configuration.
- Register : CFG2(0x01)
- Bit Fields : [7:6]
- Default : 0x2
- Description : Selects the delay when CLKOUT starts toggling upon exiting SHUTDOWN mode, in divided XO clock cycles
- Enumerator:
Definition at line 298 of file Max4146x.h.
enum cplin_t |
Register Configuration.
- Register : PLL1(0x08)
- Bit Fields : [7:6] -Default : 0x1
- Description : Sets the level of charge pump offset current for fractional N mode to improve close in phase noise. Set to 'DISABLED' for integer N mode.
- Enumerator:
Definition at line 547 of file Max4146x.h.
enum cpval_t |
Register Configuration.
- Register : PLL2(0x09)
- Bit Fields : [1:0]
- Default : 0x0
- Description : Sets Charge Pump Current in microAmpere
Definition at line 681 of file Max4146x.h.
enum fourwire1_t |
Register Configuration.
- Register : CFG6(0x0A)
- Bit Fields : [0]
- Default : 0b0
- Description : Four wire readback on CLKOUT pin mode.
- Enumerator:
FOURWIRE1_READBACK_DISABLE 0x0: Four wire readback disabled.
FOURWIRE1_READBACK_ENABLE 0x1: Four wire readback enabled.
Definition at line 745 of file Max4146x.h.
enum fourwire2_t |
Register Configuration.
- Register : CFG7(0x10)
- Bit Fields : [0]
- Default : 0b0
- Description : Four wire readback on CLKOUT pin mode. Aliased address for FOURWIRE1
- Enumerator:
FOURWIRE2_READBACK_DISABLE 0x0: Four wire readback disabled.
FOURWIRE2_READBACK_ENABLE 0x1: Four wire readback enabled.
Definition at line 790 of file Max4146x.h.
enum fracmode_t |
Register Configuration.
- Register : PLL1(0x08)
- Bit Fields : [5]
- Default : 0b1
- Description : Sets PLL between fractional-N and integer-N mode.
Definition at line 583 of file Max4146x.h.
enum fskshape_t |
Register Configuration.
- Register : CFG1(0x00)
- Bit Fields : [2]
- Default : 0b0
- Description : Sets the state of FSK Gaussian Shaping
Definition at line 199 of file Max4146x.h.
enum i2c_txen1_t |
Register Configuration.
- Register : CFG6(0x0A)
- Bit Fields : [2]
- Default : 0b0
- Description : Enables DATA transmission in I2C mode. Aliased address for I2C_TXEN1.
- Enumerator:
I2C_TXEN1_DISABLE 0x0: Data transmission not enabled in I2C mode.
I2C_TXEN1_ENABLE 0x1: Data transmission enabled in I2C mode.
Definition at line 715 of file Max4146x.h.
enum i2c_txen2_t |
Register Configuration.
- Register : CFG7(0x10)
- Bit Fields : [2]
- Default : 0b0
- Description : Enables DATA transmission in I2C mode. Aliased address for I2C_TXEN1
- Enumerator:
I2C_TXEN2_DISABLE 0x0: Data transmission not enabled in I2C mode.
I2C_TXEN2_ENABLE 0x1: Data transmission enabled in I2C mode.
Definition at line 760 of file Max4146x.h.
enum lodiv_t |
- Enumerator:
LODIV_DISABLED 0x0: Disabled
LODIV_DIVIDE_BY_4 0x1: LC VCO divided by 4
LODIV_DIVIDE_BY_8 0x2: LC VCO divided by 8
LODIV_DIVIDE_BY_12 0x3: LC VCO divided by 12
Definition at line 613 of file Max4146x.h.
enum lomode_t |
Register Configuration.
- Register : PLL1(0x08)
- Bit Fields : [0]
- Default : 0b0
- Description : Sets LO generation. For lower power, choose LOWCURRENT. For higher performance, choose LOWNOISE
Definition at line 648 of file Max4146x.h.
enum modmode_t |
Register Configuration.
- Register : CFG1(0x00)
- Bit Fields : [0]
- Default : 0b0
- Description : Configures modulator mode
Definition at line 264 of file Max4146x.h.
enum operation_mode_t |
Operation state of the rf transmitter.
- Default : 0b0
- Description : Places DUT into software reset.
Definition at line 866 of file Max4146x.h.
enum pa_boost_t |
Register Configuration.
- Register : SHDN(0x05)
- Bit Fields : [0]
- Default : 0x0
- Description : Enables a boost in PA output power for frequencies above 850MHz. This requires a different PA match compared to normal operation.
- Enumerator:
PA_BOOST_NORMAL_MODE 0x0: PA Output power in normal operation.
PA_BOOST_BOOST_MODE 0x1: PA Output power in boost mode for more output power.
Definition at line 412 of file Max4146x.h.
enum pacap_t |
Register Configuration.
- Register : PA2(0x07)
- Bit Fields : [4:0]
- Default : 0x00
- Description : Controls shunt capacitance on PA output in fF.
Definition at line 483 of file Max4146x.h.
enum papwr_t |
Register Configuration.
- Register : PA1(0x06)
- Bit Fields : [2:0]
- Default : 0x0
- Description : Controls the PA output power by enabling parallel drivers.
- Enumerator:
Definition at line 444 of file Max4146x.h.
enum pktlen_mode_t |
Register Configuration.
- Register : I2C1(0x11)
- Bit Fields : [7]
- Default : 0b0
- Description : Packet Length Mode
- Enumerator:
Definition at line 807 of file Max4146x.h.
enum pwdn_mode_t |
Register Configuration.
- Register : CFG4(0x03)
- Bit Fields : [1:0]
- Default : 0x0
- Description : Power Down Mode Select.
- Enumerator:
Definition at line 374 of file Max4146x.h.
enum softreset_t |
Register Configuration.
- Register : CFG8(0x17)
- Bit Fields : [0]
- Default : 0b0
- Description : Places DUT into software reset.
- Enumerator:
SOFTRESET_DEASSERT 0x0: Deassert the reset
SOFTRESET_RESET 0x1: Resets the entire digital, until this bit is set to 0
Definition at line 845 of file Max4146x.h.
enum spi_txen1_t |
Register Configuration.
- Register : CFG6(0x0A)
- Bit Fields : [1]
- Default : 0b0
- Description : Transmission enable.
- Enumerator:
SPI_TXEN1_DISABLE 0x0: Transmission disabled.
SPI_TXEN1_ENABLE 0x1: Transmission enabled.
Definition at line 730 of file Max4146x.h.
enum spi_txen2_t |
Register Configuration.
- Register : CFG7(0x10)
- Bit Fields : [1]
- Default : 0b0
- Description : Transmission enable.
- Enumerator:
SPI_TXEN2_DISABLE 0x0: Transmission disabled.
SPI_TXEN2_ENABLE 0x1: Transmission enabled.
Definition at line 775 of file Max4146x.h.
enum sync_t |
Register Configuration.
- Register : CFG1(0x00)
- Bit Fields : [1]
- Default : 0b0
- Description : Controls if clock output acts as an input. When an input, it will sample the DATA pin.
Definition at line 232 of file Max4146x.h.
enum xoclkdelay_t |
Register Configuration.
- Register : CFG1(0x00)
- Bit Fields : [7:6]
- Default : 0x2
- Description : Start delay before enabling XO clock to digital block
- Enumerator:
Definition at line 130 of file Max4146x.h.
enum xoclkdiv_t |
Register Configuration.
-Register : CFG1(0x00)
- Bit Fields : [5:4]
- Default : 0x2
- Description : XO clock division ratio for digital block
- Enumerator:
Definition at line 164 of file Max4146x.h.
Member Function Documentation
int adjust_baudrate | ( | float | rate ) |
Adjust baud rate.
- Parameters:
-
[in] baud_rate preferred baud rate
- Returns:
- 0 on success, negative error code on failure.
It changes only the values of BCLK_PREDIV and BCLK_POSTDIV Baud_rate = f_clk/((1+BCLK_PREDIV)x2^(1+BCLK_POSTDIV)) where f_clk = f_xtal/XOCLKDIV_ratio Note that to maintain the internal 3.2MHz time base, XOCLKDIV[1:0] (register CFG1, 0x00, bit 4) must be programmed, based on the crystal frequency
Definition at line 313 of file Max4146x.cpp.
int adjust_frequency_deviation | ( | float | deviation ) |
set the FSK deviation values (Delta_f)
- Parameters:
-
[in] deviation deviation value in in kHz baud rate
- Returns:
- 0 on success, negative error code on failure.
The mark frequency is defined by the space frequency plus a frequency deviation. If frequency shaping is disabled by setting FSKSHAPE = 0 (register CFG1, bit 2), the frequency deviation is defined by DELTAF[6:0] (register PLL6, bits 6:0). DELTAF[6 : 0] = (Delta_f * 8192)f_xtal If frequency shaping is enabled by setting FSKSHAPE = 1 (register CFG1, bit 2), the frequency deviation is defined by DETLAF_SHAPE[3:0] (register PLL7, bits 3:0). DELTAF_SHAPE[3 : 0] = (Delta_f * 8192)/(f_xtal * 10)
Definition at line 357 of file Max4146x.cpp.
int adjust_manchester_bitrate | ( | char | rate ) |
Adjust Manchester Bitrate.
- Parameters:
-
[in] data_rate preferred data rate in (1-50)kbps
- Returns:
- 0 on success, negative error code on failure.
Definition at line 381 of file Max4146x.cpp.
float get_baudrate | ( | ) |
int get_bclk_postdiv | ( | bclk_postdiv_t * | div ) |
Gets baud clock post-divider.
- Parameters:
-
[in] div divider value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 745 of file Max4146x.cpp.
int get_bclk_prediv | ( | uint8_t * | prediv ) |
Gets Baud clock predivision ratio.
- Parameters:
-
[in] prediv values between 3 and 255
- Returns:
- 0 on success, negative error code on failure.
Definition at line 772 of file Max4146x.cpp.
float get_center_frequency | ( | ) |
Gets center/carrier frequency of the chip.
- Returns:
- center/carrier frequency value between 250 MHz and 950 MHz
Definition at line 307 of file Max4146x.cpp.
int get_clkout_delay | ( | clkout_delay_t * | delay ) |
Gets clkout delay.
- Parameters:
-
[in] delay delay cycles
- Returns:
- 0 on success, negative error code on failure.
Definition at line 722 of file Max4146x.cpp.
int get_cplin | ( | cplin_t * | cplin ) |
Gets level of charge pump offset current.
- Parameters:
-
[in] cplin percentage of charge pump current
- Returns:
- 0 on success, negative error code on failure.
Definition at line 935 of file Max4146x.cpp.
int get_cpval | ( | cpval_t * | cpval ) |
Gets charge pump current.
- Parameters:
-
[in] cpval current value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1028 of file Max4146x.cpp.
float get_crystal_frequency | ( | ) |
Get the crystal frequency of the chip (Fxtal)
- Returns:
- crystal frequency values between 12.8 MHz and 19.2 MHz
Definition at line 287 of file Max4146x.cpp.
int get_deltaf | ( | uint8_t * | deltaf ) |
Get frequency deviation from the space frequency for the mark frequency.
- Parameters:
-
[in] deltaf frequency deviation value
- Returns:
- 0 on success, negative error code on failure.
fDELTA = DELTAF[6:0]* fXTAL/8192
Definition at line 1081 of file Max4146x.cpp.
int get_deltaf_shape | ( | uint8_t * | deltaf_shape ) |
Gets frequency deviation from the space frequency for the mark frequency.
- Parameters:
-
[in] deltaf_shape frequency deviation value
- Returns:
- 0 on success, negative error code on failure.
fDELTA = DELTAF_SHAPE[3:0]* fXTAL/81920
Definition at line 1108 of file Max4146x.cpp.
int get_fifo_flags | ( | uint8_t * | fifo_flags ) |
get fifo flags (I2C6) Read only
- Parameters:
-
[in] fifo_flags 8-bit fifo flags
- Returns:
- 0 on success, negative error code on failure.
Definition at line 586 of file Max4146x.cpp.
int get_fracmode | ( | fracmode_t * | fracmode ) |
Gets PLL mode.
- Parameters:
-
[in] fracmode Integer N/Fractional N mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 958 of file Max4146x.cpp.
int get_frequency | ( | uint32_t * | freq ) |
Gets PLL frequency.
- Parameters:
-
[in] freq FREQ value to PLL between 0x00 and 0xFFFFFF
- Returns:
- 0 on success, negative error code on failure.
LO frequency = FREQ<23:0>/2^16*fXTAL
Definition at line 1052 of file Max4146x.cpp.
int get_fskshape | ( | fskshape_t * | shape ) |
Gets the state of FSK Gaussian Shaping.
- Parameters:
-
[in] shape enable/disable fskshaping
- Returns:
- 0 on success, negative error code on failure.
Definition at line 653 of file Max4146x.cpp.
int get_i2c_pktlen | ( | uint16_t * | pktlen ) |
Gets Packet Length for I2C communication.
- Parameters:
-
[in] pktlen values between 0x00 and 0x7FF
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1161 of file Max4146x.cpp.
int get_lodiv | ( | lodiv_t * | lodiv ) |
Gets divider of LC VCO.
- Parameters:
-
[in] lodiv divider value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 981 of file Max4146x.cpp.
int get_lomode | ( | lomode_t * | lomode ) |
Gets LO generation.
- Parameters:
-
[in] lomode selection of mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1004 of file Max4146x.cpp.
char get_manchester_bitrate | ( | ) |
Get Manchester Bitrate.
- Returns:
- data rate in (1-50)kbps
Definition at line 389 of file Max4146x.cpp.
int get_modmode | ( | modmode_t * | mode ) |
Gets modulator mode.
- Parameters:
-
[in] mode ASK or FSK
- Returns:
- 0 on success, negative error code on failure.
Definition at line 699 of file Max4146x.cpp.
int get_pa_boost | ( | pa_boost_t * | pa_boost ) |
Gets boost mode.
- Parameters:
-
[in] pa_boost power amplifier output mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 866 of file Max4146x.cpp.
int get_pacap | ( | pacap_t * | pacap ) |
Gets shunt capacitance value.
- Parameters:
-
[in] pacap shunt capacitance value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 912 of file Max4146x.cpp.
int get_papwr | ( | papwr_t * | papwr ) |
Gets PA output power.
- Parameters:
-
[in] papwr number of parallel drivers
- Returns:
- 0 on success, negative error code on failure.
Definition at line 889 of file Max4146x.cpp.
int get_pktcomplete | ( | uint8_t * | pktcomplete ) |
get pktcomplete bit field flags (I2C4) Read only
- Parameters:
-
[in] pktcomplete 0x0: Packet transmission is not completed 0x1: Packet transmission is completed
- Returns:
- 0 on success, negative error code on failure.
Definition at line 592 of file Max4146x.cpp.
int get_pktlen_mode | ( | pktlen_mode_t * | pktlen_mode ) |
Gets packet length.
- Parameters:
-
[in] pktlen_mode packet length mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1131 of file Max4146x.cpp.
int get_pwdn_mode | ( | pwdn_mode_t * | pwdn_mode ) |
Gets power down mode.
- Parameters:
-
[in] pwdn_mode power down mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 795 of file Max4146x.cpp.
int get_sync | ( | sync_t * | state ) |
Gets the state of clock pin.
- Parameters:
-
[in] state pin state async/sync
- Returns:
- 0 on success, negative error code on failure.
Definition at line 676 of file Max4146x.cpp.
int get_tstep | ( | uint8_t * | tstep ) |
Gets tstep.
- Parameters:
-
[in] tstep values between 0 and 31
- Returns:
- 0 on success, negative error code on failure.
Definition at line 818 of file Max4146x.cpp.
int get_tx_pktlen | ( | uint16_t * | pktlen ) |
get packet length of transmitted packet
- Parameters:
-
[in] pktlen Provides status information of bits transmitted for the current packet
- Returns:
- 0 on success, negative error code on failure.
Definition at line 607 of file Max4146x.cpp.
int get_xoclkdelay | ( | xoclkdelay_t * | delay ) |
Get start delay before enabling XO clock to digital block.
- Parameters:
-
[in] delay delay cycle
- Returns:
- 0 on success, negative error code on failure.
Definition at line 571 of file Max4146x.cpp.
int get_xoclkdiv | ( | xoclkdiv_t * | div ) |
Get XO clock division ratio for digital block.
- Parameters:
-
[in] div division ratio
- Returns:
- 0 on success, negative error code on failure.
Definition at line 630 of file Max4146x.cpp.
int initial_programming | ( | void | ) |
Initial programming steps after power on or soft reset.
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1181 of file Max4146x.cpp.
int read_register | ( | uint8_t | reg, |
uint8_t * | value, | ||
uint8_t | len | ||
) |
Read from a register.
- Parameters:
-
[in] reg Address of a register to be read. [out] value Pointer to save result value. [in] len Size of result to be read.
- Returns:
- 0 on success, negative error code on failure.
Definition at line 192 of file Max4146x.cpp.
int send_data | ( | uint8_t * | data, |
uint32_t | length | ||
) |
Send data for selected Preset/I2C/SPI mode.
- Parameters:
-
[in] data data pointer for data to be transferred [in] length legth of data to be transferred
- Returns:
- 0 on success, negative error code on failure.
Definition at line 434 of file Max4146x.cpp.
int set_bclk_postdiv | ( | bclk_postdiv_t | div ) |
Sets baud clock post-divider.
- Parameters:
-
[in] div divider value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 737 of file Max4146x.cpp.
int set_bclk_prediv | ( | uint8_t | prediv ) |
Set Baud clock predivision ratio.
- Parameters:
-
[in] prediv values between 3 and 255
- Returns:
- 0 on success, negative error code on failure.
Definition at line 760 of file Max4146x.cpp.
int set_center_frequency | ( | float | freq ) |
Adjust center/carrier frequency of the chip.
- Parameters:
-
[in] freq center/carrier frequency value between 250 MHz and 950 MHz
- Returns:
- 0 on success, negative error code on failure.
Definition at line 293 of file Max4146x.cpp.
int set_clkout_delay | ( | clkout_delay_t | delay ) |
Sets clkout delay.
- Parameters:
-
[in] delay delay cycles
- Returns:
- 0 on success, negative error code on failure.
Definition at line 714 of file Max4146x.cpp.
int set_cplin | ( | cplin_t | cplin ) |
set level of charge pump offset current
- Parameters:
-
[in] cplin percentage of charge pump current
- Returns:
- 0 on success, negative error code on failure.
Definition at line 927 of file Max4146x.cpp.
int set_cpval | ( | cpval_t | cpval ) |
set charge pump current
- Parameters:
-
[in] cpval current value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1019 of file Max4146x.cpp.
int set_crystal_frequency | ( | float | freq ) |
Configures the crystal frequency of the chip (Fxtal)
- Parameters:
-
[in] freq crystal frequency values between 12.8 MHz and 19.2 MHz
- Returns:
- 0 on success, negative error code on failure.
Definition at line 276 of file Max4146x.cpp.
int set_deltaf | ( | uint8_t | deltaf ) |
Set frequency deviation from the space frequency for the mark frequency.
- Parameters:
-
[in] deltaf frequency deviation value
- Returns:
- 0 on success, negative error code on failure.
fDELTA = DELTAF[6:0]* fXTAL/8192
Definition at line 1069 of file Max4146x.cpp.
int set_deltaf_shape | ( | uint8_t | deltaf_shape ) |
Set frequency deviation from the space frequency for the mark frequency.
- Parameters:
-
[in] deltaf_shape frequency deviation value
- Returns:
- 0 on success, negative error code on failure.
fDELTA = DELTAF_SHAPE[3:0]* fXTAL/81920
Definition at line 1096 of file Max4146x.cpp.
int set_fracmode | ( | fracmode_t | fracmode ) |
set PLL mode
- Parameters:
-
[in] fracmode Integer N/Fractional N mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 950 of file Max4146x.cpp.
int set_frequency | ( | uint32_t | freq ) |
Set PLL frequency.
- Parameters:
-
[in] freq FREQ value to PLL between 0x00 and 0xFFFFFF
- Returns:
- 0 on success, negative error code on failure.
LO frequency = FREQ<23:0>/2^16*fXTAL
Definition at line 1043 of file Max4146x.cpp.
int set_fskshape | ( | fskshape_t | shape ) |
Sets the state of FSK Gaussian Shaping.
- Parameters:
-
[in] shape enable/disable fskshaping
- Returns:
- 0 on success, negative error code on failure.
Definition at line 645 of file Max4146x.cpp.
int set_i2c_pktlen | ( | uint16_t | pktlen ) |
Set Packet Length for I2C communication.
- Parameters:
-
[in] pktlen values between 0x00 and 0x7FF
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1147 of file Max4146x.cpp.
int set_lodiv | ( | lodiv_t | lodiv ) |
set divider of LC VCO
- Parameters:
-
[in] lodiv divider value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 973 of file Max4146x.cpp.
int set_lomode | ( | lomode_t | lomode ) |
set LO generation
- Parameters:
-
[in] lomode selection of mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 996 of file Max4146x.cpp.
int set_modmode | ( | modmode_t | mode ) |
Sets modulator mode to ASK or FSK.
- Parameters:
-
[in] mode ASK or FSK
- Returns:
- 0 on success, negative error code on failure.
Definition at line 691 of file Max4146x.cpp.
int set_pa_boost | ( | pa_boost_t | pa_boost ) |
enable/disable boost mode
- Parameters:
-
[in] pa_boost power amplifier output mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 858 of file Max4146x.cpp.
int set_pacap | ( | pacap_t | pacap ) |
set shunt capacitance value
- Parameters:
-
[in] pacap shunt capacitance value
- Returns:
- 0 on success, negative error code on failure.
Definition at line 904 of file Max4146x.cpp.
int set_papwr | ( | papwr_t | papwr ) |
set PA output power by enabling parallel drivers
- Parameters:
-
[in] papwr number of parallel drivers
- Returns:
- 0 on success, negative error code on failure.
Definition at line 881 of file Max4146x.cpp.
int set_pktlen_mode | ( | pktlen_mode_t | pktlen_mode ) |
set packet length
- Parameters:
-
[in] pktlen_mode packet length mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 1123 of file Max4146x.cpp.
int set_pwdn_mode | ( | pwdn_mode_t | pwdn_mode ) |
Sets power down mode.
- Parameters:
-
[in] pwdn_mode power down mode
- Returns:
- 0 on success, negative error code on failure.
Definition at line 787 of file Max4146x.cpp.
int set_softreset | ( | softreset_t | softreset ) |
set softreset bit
- Parameters:
-
[in] softreset enable/disable
- Returns:
- 0 on success, negative error code on failure.
Definition at line 555 of file Max4146x.cpp.
int set_sync | ( | sync_t | state ) |
Sets the state of clock pin.
- Parameters:
-
[in] state pin state async/sync
- Returns:
- 0 on success, negative error code on failure.
Definition at line 668 of file Max4146x.cpp.
int set_tstep | ( | uint8_t | tstep ) |
Controls GFSK shaping.
- Parameters:
-
[in] tstep values between 0 and 31
- Returns:
- 0 on success, negative error code on failure.
Definition at line 810 of file Max4146x.cpp.
int set_xoclkdelay | ( | xoclkdelay_t | delay ) |
Set start delay before enabling XO clock to digital block.
- Parameters:
-
[in] delay delay cycle
- Returns:
- 0 on success, negative error code on failure.
Definition at line 563 of file Max4146x.cpp.
int set_xoclkdiv | ( | xoclkdiv_t | div ) |
Set XO clock division ratio for digital block.
- Parameters:
-
[in] div division ratio
- Returns:
- 0 on success, negative error code on failure.
Definition at line 622 of file Max4146x.cpp.
int write_register | ( | uint8_t | reg, |
const uint8_t * | value, | ||
uint8_t | len | ||
) |
Write to a register.
- Parameters:
-
[in] reg Address of a register to be written. [out] value Pointer of value to be written to register. [in] len Size of result to be written.
- Returns:
- 0 on success, negative error code on failure.
Definition at line 241 of file Max4146x.cpp.
Generated on Tue Jul 12 2022 16:06:48 by 1.7.2