Header file for nPZero Driver. More...
Go to the source code of this file.
Data Structures | |
struct | np0_register_sleep_rst_s |
struct | np0_register_id_s |
struct | np0_register_sta1_s |
struct | np0_register_sta2_s |
struct | np0_register_pswctl_s |
struct | np0_register_syscfg1_s |
struct | np0_register_syscfg2_s |
struct | np0_register_syscfg3_s |
struct | np0_register_tout_s |
struct | np0_register_intcfg_s |
struct | np0_register_cfgp_s |
struct | np0_register_modp_s |
struct | np0_register_perp_s |
struct | np0_register_ncmdp_s |
struct | np0_register_addrp_s |
struct | np0_register_rregp_s |
struct | np0_register_throvp_s |
struct | np0_register_thrunp_s |
struct | np0_register_twtp_s |
struct | np0_register_tcfgp_s |
struct | np0_register_throva1_s |
struct | np0_register_throva2_s |
struct | np0_register_thruna1_s |
struct | np0_register_thruna2_s |
struct | np0_register_valp_s |
struct | np0_register_adc_core_s |
struct | np0_register_adc_ext_s |
struct | np0_register_sram_s |
struct | np0_status_s |
struct | np0_adc_config_channels_s |
struct | np0_peripheral_config_s |
struct | np0_device_config_s |
Functions | |
np0_status_e | np0_write_SLEEP_RST (uint8_t sleep_rst_value) |
Writes the sleep_rst struct to the sleep_rst register. | |
np0_status_e | np0_read_SLEEP_RST (uint8_t *sleep_rst_value) |
Reads the sleep_rst register and stores it in np0_register_sleep_rst_s struct. | |
np0_status_e | np0_read_ID (uint8_t *id) |
Reads the ID register and stores it in np0_register_id_s struct. | |
np0_status_e | np0_read_STA1 (np0_register_sta1_s *sta1) |
Reads the sta1 register and writes it to np0_register_sta1_s struct. | |
np0_status_e | np0_read_STA2 (np0_register_sta2_s *sta2) |
Reads the sta2 register and writes it to np0_register_sta2_s struct. | |
np0_status_e | np0_write_PSWCTL (const np0_register_pswctl_s pswctl) |
Writes the pswctl struct to the pswctl register. | |
np0_status_e | np0_read_PSWCTL (np0_register_pswctl_s *pswctl) |
Reads the pswctl register and writes it to np0_register_pswctl_s struct. | |
np0_status_e | np0_write_SYSCFG1 (const np0_register_syscfg1_s syscfg1) |
Writes the syscfg1 struct to the syscfg1 register. | |
np0_status_e | np0_read_SYSCFG1 (np0_register_syscfg1_s *syscfg1) |
Reads the syscfg1 register and writes it to np0_register_syscfg1_s struct. | |
np0_status_e | np0_write_SYSCFG2 (const np0_register_syscfg2_s syscfg2) |
Writes the syscfg2 struct to the syscfg2 register. | |
np0_status_e | np0_read_SYSCFG2 (np0_register_syscfg2_s *syscfg2) |
Reads the syscfg2 register and writes it to np0_register_syscfg2_s struct. | |
np0_status_e | np0_write_SYSCFG3 (const np0_register_syscfg3_s syscfg3) |
Writes the syscfg3 struct to the syscfg2 register. | |
np0_status_e | np0_read_SYSCFG3 (np0_register_syscfg3_s *syscfg3) |
Reads the syscfg3 register and writes it to np0_register_syscfg2_s struct. | |
np0_status_e | np0_write_TOUT (const np0_register_tout_s tout) |
Writes the tout struct to the TOUT_L and TOUT_H registers. | |
np0_status_e | np0_read_TOUT (np0_register_tout_s *tout) |
Reads the tout register and writes it to np0_register_tout_s struct. | |
np0_status_e | np0_write_INTCFG (const np0_register_intcfg_s intcfg) |
Writes the intcfg struct to the intcfg register. | |
np0_status_e | np0_read_INTCFG (np0_register_intcfg_s *intcfg) |
Reads the intcfg register and writes it to np0_register_intcfg_s struct. | |
np0_status_e | np0_write_THROVA1 (const np0_register_throva1_s throva1) |
Writes the throva1 struct to the throva1 register. | |
np0_status_e | np0_read_THROVA1 (np0_register_throva1_s *throva1) |
Reads the throva1 register and writes it to np0_register_throva1_s struct. | |
np0_status_e | np0_write_THROVA2 (const np0_register_throva2_s throva2) |
Writes the throva2 struct to the throva2 register. | |
np0_status_e | np0_read_THROVA2 (np0_register_throva2_s *throva2) |
Reads the throva2 register and writes it to np0_register_throva2_s struct. | |
np0_status_e | np0_write_THRUNA1 (const np0_register_thruna1_s thruna1) |
Writes the thruna1 struct to the TRHUNA1 register. | |
np0_status_e | np0_read_THRUNA1 (np0_register_thruna1_s *thruna1) |
Reads the thruna1 register and writes it to np0_register_thruna1_s struct. | |
np0_status_e | np0_write_THRUNA2 (const np0_register_thruna2_s thruna2) |
Writes the thruna2 struct to the TRHUNA2 register. | |
np0_status_e | np0_read_THRUNA2 (np0_register_thruna2_s *thruna2) |
Reads the thruna2 register and writes it to np0_register_thruna2_s struct. | |
np0_status_e | np0_read_ADC_CORE (np0_register_adc_core_s *adc_core) |
Reads the last value from internal ADC channel (VBAT) and stores it in np0_register_adc_core_s struct. | |
np0_status_e | np0_read_ADC_EXT (np0_register_adc_ext_s *adc_ext) |
Reads the last value from external ADC channel (ADC_IN) and stores it in np0_register_adc_ext_s struct. | |
np0_status_e | np0_write_SRAM (const uint8_t sram_reg, const uint8_t sram) |
Write one byte to one register in SRAM. | |
np0_status_e | np0_read_SRAM (const uint8_t sram_reg, np0_register_sram_s *sram) |
Reads one SRAM register and writes it to np0_register_sram_s struct. | |
np0_status_e | np0_write_CFGP (const np0_psw_e sw, const np0_register_cfgp_s cfgp) |
Writes the cfgp struct to the cfgp register that is connected to the low power switch. | |
np0_status_e | np0_read_CFGP (const np0_psw_e sw, np0_register_cfgp_s *cfgp) |
Reads the cfgp register that is connected to the low power switch and writes it to np0_register_cfgp_s struct. | |
np0_status_e | np0_write_MODP (const np0_psw_e sw, const np0_register_modp_s modp) |
Writes the modp struct to the modp register that is connected to the low power switch. | |
np0_status_e | np0_read_MODP (const np0_psw_e sw, np0_register_modp_s *modp) |
Reads the modp register that is connected to the low power switch and writes it to np0_register_modp_s struct. | |
np0_status_e | np0_write_PERP (const np0_psw_e sw, const np0_register_perp_s perp) |
Writes the perp struct to the perp register that is connected to the low power switch. | |
np0_status_e | np0_read_PERP (const np0_psw_e sw, np0_register_perp_s *perp) |
Reads the perp register that is connected to the low power switch and writes it to np0_register_perp_s struct. | |
np0_status_e | np0_write_NCMDP (const np0_psw_e sw, const np0_register_ncmdp_s ncmdp) |
Writes the ncmdp struct to the ncmdp register that is connected to the low power switch. | |
np0_status_e | np0_read_NCMDP (const np0_psw_e sw, np0_register_ncmdp_s *ncmdp) |
Reads the ncmdp register that is connected to the low power switch and writes it to np0_register_ncmdp_s struct. | |
np0_status_e | np0_write_ADDRP (const np0_psw_e sw, const np0_register_addrp_s addrp) |
Writes the addrp struct to the addrp register that is connected to the low power switch. | |
np0_status_e | np0_read_ADDRP (const np0_psw_e sw, np0_register_addrp_s *addrp) |
Reads the addrp register that is connected to the low power switch and writes it to np0_register_addrp_s struct. | |
np0_status_e | np0_write_RREGP (const np0_psw_e sw, const np0_register_rregp_s rregp) |
Writes the rregp struct to the rregp register that is connected to the low power switch. | |
np0_status_e | np0_read_RREGP (const np0_psw_e sw, np0_register_rregp_s *rregp) |
Reads the rrep register that is connected to the low power switch and writes it to np0_register_rregp_s struct. | |
np0_status_e | np0_write_THROVP (const np0_psw_e sw, const np0_register_throvp_s throvp) |
Writes the throvp struct to the throvp register that is connected to the low power switch. | |
np0_status_e | np0_read_THROVP (const np0_psw_e sw, np0_register_throvp_s *throvp) |
Reads the throvp register that is connected to the low power switch and writes it to np0_register_throvp_s struct. | |
np0_status_e | np0_write_THRUNP (const np0_psw_e sw, const np0_register_thrunp_s thrunp) |
Writes the thrunp struct to the thrunp register that is connected to the low power switch. | |
np0_status_e | np0_read_THRUNP (const np0_psw_e sw, np0_register_thrunp_s *thrunp) |
Reads the thrunp register that is connected to the low power switch and writes it to np0_register_thrunp_s struct. | |
np0_status_e | np0_write_TWTP (const np0_psw_e sw, const np0_register_twtp_s twtp) |
Writes the twtp struct to the twtp register that is connected to the low power switch. | |
np0_status_e | np0_read_TWTP (const np0_psw_e sw, np0_register_twtp_s *twtp) |
Reads the twtp register that is connected to the low power switch and writes it to np0_register_twtp_s struct. | |
np0_status_e | np0_write_TCFGP (const np0_psw_e sw, const np0_register_tcfgp_s tcfgp) |
Writes the tcfgp struct to the tcfgp register that is connected to the low power switch. | |
np0_status_e | np0_read_TCFGP (const np0_psw_e sw, np0_register_tcfgp_s *tcfgp) |
Reads the tcfgp register that is connected to the low power switch and writes it to np0_register_tcfgp_s struct. | |
np0_status_e | np0_read_VALP (const np0_psw_e sw, np0_register_valp_s *valp) |
Reads the valp register that is connected to the low power switch and writes it to np0_register_valp_s struct. | |
np0_status_e | np0_read_register (uint8_t register_address, void *buffer, size_t size) |
Generic function to read from a device register using I2C. | |
Header file for nPZero Driver.
This header file contains declarations and definitions for the IPMIC driver for controlling and managing the Intelligent Power Management Integrated Circuit (IPMIC). It provides function prototypes, constants, enumerations and structures necessary for interacting with the IPMIC on register level.
This driver is designed to work with the nPZero IPMIC from Nanopower Semiconductor. It uitilizes I2C communication protocol for interfacing with host MCU.
enum np0_adc_clk_e |
enum np0_com_protocol_e |
enum np0_data_type_e |
Data type value of value to be read from peripheral, see np0_register_modp_s.
Enumerator | |
---|---|
DATA_TYPE_UINT16 | 16-bit unsigned integer. |
DATA_TYPE_INT16 | 16-bit signed integer. |
DATA_TYPE_UINT8 | 8-bit unsigned integer. |
enum np0_endianess_e |
Host power switch mode (SW_HP pin), see np0_register_pswctl_s.
enum np0_i2c_pull_sel_e |
enum np0_int_pin_pull_e |
Peripheral interrupt pin mode (pins INT*), see np0_register_cfgp_s.
enum np0_io_str_e |
enum np0_multibyte_e |
enum np0_polling_mode_e |
Peripheral polling mode, see np0_register_cfgp_s.
enum np0_post_wait_time_e |
enum np0_power_mode_e |
Peripheral power mode, see np0_register_cfgp_s.
Enumerator | |
---|---|
POWER_MODE_DISABLED | Disabled. |
POWER_MODE_PERIODIC | Periodic power-on. |
POWER_MODE_ALWAYS_ON | Always on. |
Peripheral power switch mode (pins SW_LP*), see np0_register_cfgp_s.
enum np0_pre_wait_time_e |
enum np0_psw_e |
Low Power switches, see np0_register_pswctl_s.
Enumerator | |
---|---|
PSW_LP1 | Low power switch 1, Default SPI. |
PSW_LP2 | Low power switch 2, Default I2C. |
PSW_LP3 | Low power switch 3, Default SPI. |
PSW_LP4 | Low power switch 4, Default I2C. |
enum np0_resetsource_e |
Enumerations. Reset Reason, see np0_register_sta1_s.
enum np0_sclk_div_e |
enum np0_sclk_sel_e |
enum np0_spi_auto_e |
enum np0_spimod_e |
SPI modes available if SPI is enabled, see np0_register_modp_s.
Enumerator | |
---|---|
SPIMOD_SPI_MODE_0 | CPOL = 0 CPHA = 0. |
SPIMOD_SPI_MODE_1 | CPOL = 0 CPHA = 1. |
SPIMOD_SPI_MODE_2 | CPOL = 1 CPHA = 0. |
SPIMOD_SPI_MODE_3 | CPOL = 1 CPHA = 1. |
enum np0_states_e |
enum np0_wakeup_e |
enum np0_xo_clkout_div_e |
np0_status_e np0_read_ADC_CORE | ( | np0_register_adc_core_s * | adc_core | ) |
Reads the last value from internal ADC channel (VBAT) and stores it in np0_register_adc_core_s struct.
[out] | adc_core | Pointer to ADC Core register where value will be stored. |
np0_status_e np0_read_ADC_EXT | ( | np0_register_adc_ext_s * | adc_ext | ) |
Reads the last value from external ADC channel (ADC_IN) and stores it in np0_register_adc_ext_s struct.
[out] | adc_ext | Pointer to ADC External register where value will be stored. |
np0_status_e np0_read_ADDRP | ( | const np0_psw_e | sw, |
np0_register_addrp_s * | addrp ) |
Reads the addrp register that is connected to the low power switch and writes it to np0_register_addrp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | addrp | Pointer to Address Peripheral register where value will be stored. |
np0_status_e np0_read_CFGP | ( | const np0_psw_e | sw, |
np0_register_cfgp_s * | cfgp ) |
Reads the cfgp register that is connected to the low power switch and writes it to np0_register_cfgp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | cfgp | Pointer to Config Peripheral where value will be stored. |
np0_status_e np0_read_ID | ( | uint8_t * | id | ) |
Reads the ID register and stores it in np0_register_id_s struct.
[out] | id | Pointer to id where value will be stored. |
np0_status_e np0_read_INTCFG | ( | np0_register_intcfg_s * | intcfg | ) |
Reads the intcfg register and writes it to np0_register_intcfg_s struct.
[out] | intcfg | Pointer to Interrupt pin config register where value will be stored. |
np0_status_e np0_read_MODP | ( | const np0_psw_e | sw, |
np0_register_modp_s * | modp ) |
Reads the modp register that is connected to the low power switch and writes it to np0_register_modp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | modp | Pointer to Mode Peripheral register where value will be stored. |
np0_status_e np0_read_NCMDP | ( | const np0_psw_e | sw, |
np0_register_ncmdp_s * | ncmdp ) |
Reads the ncmdp register that is connected to the low power switch and writes it to np0_register_ncmdp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | ncmdp | Pointer to Number Of Commands register where value will be stored. |
np0_status_e np0_read_PERP | ( | const np0_psw_e | sw, |
np0_register_perp_s * | perp ) |
Reads the perp register that is connected to the low power switch and writes it to np0_register_perp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | perp | Pointer to Polling Period register where value will be stored. |
np0_status_e np0_read_PSWCTL | ( | np0_register_pswctl_s * | pswctl | ) |
Reads the pswctl register and writes it to np0_register_pswctl_s struct.
[out] | pswctl | Pointer to power switch register where value will be stored. |
np0_status_e np0_read_register | ( | uint8_t | register_address, |
void * | buffer, | ||
size_t | size ) |
Generic function to read from a device register using I2C.
register_address | The address of the register to read from. |
buffer | Pointer to the buffer where the read data will be stored. |
size | The size of the data to read. |
np0_status_e np0_read_RREGP | ( | const np0_psw_e | sw, |
np0_register_rregp_s * | rregp ) |
Reads the rrep register that is connected to the low power switch and writes it to np0_register_rregp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | rregp | Pointer to Read Register Peripheral register where value will be stored. |
np0_status_e np0_read_SLEEP_RST | ( | uint8_t * | sleep_rst_value | ) |
Reads the sleep_rst register and stores it in np0_register_sleep_rst_s struct.
[out] | sleep_rst_value | Pointer to store the read sleep value. |
np0_status_e np0_read_SRAM | ( | const uint8_t | sram_reg, |
np0_register_sram_s * | sram ) |
Reads one SRAM register and writes it to np0_register_sram_s struct.
[in] | sram_reg | Register address in SRAM to read a byte from. |
[out] | sram | Pointer to SRAM register where value will be stored. |
np0_status_e np0_read_STA1 | ( | np0_register_sta1_s * | sta1 | ) |
Reads the sta1 register and writes it to np0_register_sta1_s struct.
[out] | sta1 | Pointer to status 1 register where value will be stored. |
np0_status_e np0_read_STA2 | ( | np0_register_sta2_s * | sta2 | ) |
Reads the sta2 register and writes it to np0_register_sta2_s struct.
[out] | sta2 | Pointer to status 2 register where value will be stored. |
np0_status_e np0_read_SYSCFG1 | ( | np0_register_syscfg1_s * | syscfg1 | ) |
Reads the syscfg1 register and writes it to np0_register_syscfg1_s struct.
[out] | syscfg1 | Pointer to system config 1 where value will be stored. |
np0_status_e np0_read_SYSCFG2 | ( | np0_register_syscfg2_s * | syscfg2 | ) |
Reads the syscfg2 register and writes it to np0_register_syscfg2_s struct.
[out] | syscfg2 | Pointer to System config 2 register where value will be stored.. |
np0_status_e np0_read_SYSCFG3 | ( | np0_register_syscfg3_s * | syscfg3 | ) |
Reads the syscfg3 register and writes it to np0_register_syscfg2_s struct.
[out] | syscfg3 | Pointer to System config 3 register where value will be stored.. |
np0_status_e np0_read_TCFGP | ( | const np0_psw_e | sw, |
np0_register_tcfgp_s * | tcfgp ) |
Reads the tcfgp register that is connected to the low power switch and writes it to np0_register_tcfgp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | tcfgp | Pointer to Time To Wait Peripheral register where value will be stored. |
np0_status_e np0_read_THROVA1 | ( | np0_register_throva1_s * | throva1 | ) |
Reads the throva1 register and writes it to np0_register_throva1_s struct.
[out] | throva1 | Pointer to Threshold Over ADC 1 register where value will be stored. |
np0_status_e np0_read_THROVA2 | ( | np0_register_throva2_s * | throva2 | ) |
Reads the throva2 register and writes it to np0_register_throva2_s struct.
[out] | throva2 | Pointer to Thershold Over ADC 2 register where value will be stored. |
np0_status_e np0_read_THROVP | ( | const np0_psw_e | sw, |
np0_register_throvp_s * | throvp ) |
Reads the throvp register that is connected to the low power switch and writes it to np0_register_throvp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | throvp | Pointer to Threshold Over Peripheral register where value will be stored. |
np0_status_e np0_read_THRUNA1 | ( | np0_register_thruna1_s * | thruna1 | ) |
Reads the thruna1 register and writes it to np0_register_thruna1_s struct.
[out] | thruna1 | Pointer to Threshold Under ADC 1 register where value will be stored. |
np0_status_e np0_read_THRUNA2 | ( | np0_register_thruna2_s * | thruna2 | ) |
Reads the thruna2 register and writes it to np0_register_thruna2_s struct.
[out] | thruna2 | Pointer to Threshold Under ADC 2 register where value will be stored. |
np0_status_e np0_read_THRUNP | ( | const np0_psw_e | sw, |
np0_register_thrunp_s * | thrunp ) |
Reads the thrunp register that is connected to the low power switch and writes it to np0_register_thrunp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | thrunp | Pointer to Threshold Under Peripheral register where value will be stored. |
np0_status_e np0_read_TOUT | ( | np0_register_tout_s * | tout | ) |
Reads the tout register and writes it to np0_register_tout_s struct.
[out] | tout | Pointer to Global Timeout register where value will be stored. |
np0_status_e np0_read_TWTP | ( | const np0_psw_e | sw, |
np0_register_twtp_s * | twtp ) |
Reads the twtp register that is connected to the low power switch and writes it to np0_register_twtp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | twtp | Pointer to Time To Wait Peripheral register where value will be stored. |
np0_status_e np0_read_VALP | ( | const np0_psw_e | sw, |
np0_register_valp_s * | valp ) |
Reads the valp register that is connected to the low power switch and writes it to np0_register_valp_s struct.
[in] | sw | Low power switch indicates which peripheral will be read. |
[out] | valp | Pointer to Value Peripheral register where value will be stored. |
np0_status_e np0_write_ADDRP | ( | const np0_psw_e | sw, |
const np0_register_addrp_s | addrp ) |
Writes the addrp struct to the addrp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | addrp | Address Peripheral register that holds the value to be written. |
np0_status_e np0_write_CFGP | ( | const np0_psw_e | sw, |
const np0_register_cfgp_s | cfgp ) |
Writes the cfgp struct to the cfgp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | cfgp | Config Peripheral register that holds value to be written. |
np0_status_e np0_write_INTCFG | ( | const np0_register_intcfg_s | intcfg | ) |
Writes the intcfg struct to the intcfg register.
[in] | intcfg | Interrupt pin config register that holds value to be written. |
np0_status_e np0_write_MODP | ( | const np0_psw_e | sw, |
const np0_register_modp_s | modp ) |
Writes the modp struct to the modp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | modp | Mode Peripheral register that holds value to be written. |
np0_status_e np0_write_NCMDP | ( | const np0_psw_e | sw, |
const np0_register_ncmdp_s | ncmdp ) |
Writes the ncmdp struct to the ncmdp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | ncmdp | Number Of Commands register that holds the value to be written. |
np0_status_e np0_write_PERP | ( | const np0_psw_e | sw, |
const np0_register_perp_s | perp ) |
Writes the perp struct to the perp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | perp | Polling Period register that holds the value to be written. |
np0_status_e np0_write_PSWCTL | ( | const np0_register_pswctl_s | pswctl | ) |
Writes the pswctl struct to the pswctl register.
[in] | pswctl | Power switch control register that holds value to be written. |
np0_status_e np0_write_RREGP | ( | const np0_psw_e | sw, |
const np0_register_rregp_s | rregp ) |
Writes the rregp struct to the rregp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | rregp | Read Register Peripheral register that holds the value to be written. |
np0_status_e np0_write_SLEEP_RST | ( | uint8_t | sleep_rst_value | ) |
Writes the sleep_rst struct to the sleep_rst register.
When set to OxFF, the device will enter sleep mode, shutting down the host power and assuming control of the I2C bus.
When set to 0xA5, the device will soft reset.
[in] | sleep_rst_value | that holds value to be written. |
np0_status_e np0_write_SRAM | ( | const uint8_t | sram_reg, |
const uint8_t | sram ) |
Write one byte to one register in SRAM.
[in] | sram_reg | Register address in SRAM to write to. |
[in] | sram | SRAM register that holds value to be written. |
np0_status_e np0_write_SYSCFG1 | ( | const np0_register_syscfg1_s | syscfg1 | ) |
Writes the syscfg1 struct to the syscfg1 register.
[in] | syscfg1 | System config 1 register that holds value to be written. |
np0_status_e np0_write_SYSCFG2 | ( | const np0_register_syscfg2_s | syscfg2 | ) |
Writes the syscfg2 struct to the syscfg2 register.
[in] | syscfg2 | System config 2 register that holds value to be written. |
np0_status_e np0_write_SYSCFG3 | ( | const np0_register_syscfg3_s | syscfg3 | ) |
Writes the syscfg3 struct to the syscfg2 register.
[in] | syscfg3 | System config 3 register that holds value to be written. |
np0_status_e np0_write_TCFGP | ( | const np0_psw_e | sw, |
const np0_register_tcfgp_s | tcfgp ) |
Writes the tcfgp struct to the tcfgp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | tcfgp | Time To Wait Config Peripheral register that holds the value to be written. |
np0_status_e np0_write_THROVA1 | ( | const np0_register_throva1_s | throva1 | ) |
Writes the throva1 struct to the throva1 register.
[in] | throva1 | Threshold Over ADC 1 register that holds value to be written. |
np0_status_e np0_write_THROVA2 | ( | const np0_register_throva2_s | throva2 | ) |
Writes the throva2 struct to the throva2 register.
[in] | throva2 | Threshold Over ADC 2 register that holds value to be written. |
np0_status_e np0_write_THROVP | ( | const np0_psw_e | sw, |
const np0_register_throvp_s | throvp ) |
Writes the throvp struct to the throvp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | throvp | Threshold Over Peripheral register that holds the value to be written. |
np0_status_e np0_write_THRUNA1 | ( | const np0_register_thruna1_s | thruna1 | ) |
Writes the thruna1 struct to the TRHUNA1 register.
[in] | thruna1 | Threshold Under ADC 1 register that holds value to be written. |
np0_status_e np0_write_THRUNA2 | ( | const np0_register_thruna2_s | thruna2 | ) |
Writes the thruna2 struct to the TRHUNA2 register.
[out] | thruna2 | Threshold Under ADC 2 register that holds value to be written. |
np0_status_e np0_write_THRUNP | ( | const np0_psw_e | sw, |
const np0_register_thrunp_s | thrunp ) |
Writes the thrunp struct to the thrunp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | thrunp | Threshold Under Peripheral register that holds the value to be written. |
np0_status_e np0_write_TOUT | ( | const np0_register_tout_s | tout | ) |
Writes the tout struct to the TOUT_L and TOUT_H registers.
[in] | tout | Global Timeout register that holds value to be written. |
np0_status_e np0_write_TWTP | ( | const np0_psw_e | sw, |
const np0_register_twtp_s | twtp ) |
Writes the twtp struct to the twtp register that is connected to the low power switch.
[in] | sw | Low power switch indicates which peripheral that will be written. |
[in] | twtp | Time To Wait Peripheral register that holds the value to be written. |