AFE_NXP_Arduino 0.2.0
AFE (NAFE13388) device operation sample code for Arduino
|
#include <AFE_NXP.h>
Public Member Functions | |
NAFE13388_Base () | |
virtual | ~NAFE13388_Base () |
virtual void | begin (void) |
virtual void | boot (void) |
virtual void | reset (void) |
virtual void | board_init (int _pin_nINT, int _pin_DRDY, int _pin_SYN, int _pin_nRESET) |
virtual void | logical_ch_config (int ch, uint16_t cc0, uint16_t cc1, uint16_t cc2, uint16_t cc3) |
virtual double | read (int ch) |
![]() | |
void | txrx (uint8_t *data, int size) |
void | write_r16 (uint16_t reg) |
void | write_r16 (uint16_t reg, uint16_t val) |
uint16_t | read_r16 (uint16_t reg) |
void | write_r24 (uint16_t reg, uint32_t val) |
int32_t | read_r24 (uint16_t reg) |
Public Attributes | |
int | enabled_channels |
double | coeff_uV [16] |
NAFE13388_Base::NAFE13388_Base | ( | ) |
Constructor to create a NAFE13388 instance
Definition at line 5 of file AFE_NXP.cpp.
|
virtual |
Destractor
Definition at line 9 of file AFE_NXP.cpp.
|
virtual |
Begin the device operation
NAFE13388 initialization. It does following steps (1) Set pins 2 and 3 are input for nINT and nDRDY (2) Set pins 5 and 6 are output and fixed to HIGH for ADC_SYN and ADC_nRESET (3) Call reset() (4) Call boot()
Definition at line 13 of file AFE_NXP.cpp.
|
virtual |
Board initialization (initializing control pin state)
_pin_nINT | pin number for nINT |
_pin_DRDY | pin number for DRDY |
_pin_SYN | pin number for SYN |
_pin_nRESET | pin number for nRESET |
Definition at line 38 of file AFE_NXP.cpp.
Referenced by NAFE13388::NAFE13388(), and NAFE13388_UIM::NAFE13388_UIM().
|
virtual |
|
virtual |
Configure logical channel
ch | logical channel number (0 ~ 15) |
cc0 | 16bit value to be set CH_CONFIG0 register (0x20) |
cc1 | 16bit value to be set CH_CONFIG1 register (0x21) |
cc2 | 16bit value to be set CH_CONFIG2 register (0x22) |
cc3 | 16bit value to be set CH_CONFIG3 register (0x23) |
Definition at line 53 of file AFE_NXP.cpp.
|
virtual |
Read ADC
ch | logical channel number (0 ~ 15) |
Definition at line 78 of file AFE_NXP.cpp.
|
virtual |
double NAFE13388_Base::coeff_uV[16] |
Coefficient to convert from ADC read value to micro-volt
Definition at line 77 of file AFE_NXP.h.
Referenced by logical_ch_config(), and read().
int NAFE13388_Base::enabled_channels |
Number of enabled logical channels
Definition at line 74 of file AFE_NXP.h.
Referenced by logical_ch_config().