Go to the documentation of this file.
3 #ifndef _FW_BOARD_NI_V4_h
4 #define _FW_BOARD_NI_V4_h
6 #if defined(ARDUINO) && ARDUINO >= 100
16 #define PLOOP_MODEL GS_05
17 #define PPATIENT_MODEL DS_01
18 #define PVENTURI DS_01
29 bool I2CRead(
t_i2cdevices device, uint8_t* wbuffer,
int wlength, uint8_t* rbuffer,
int rlength,
bool stop);
36 void __delay_blocking_ms(uint32_t ms);
39 int64_t Get_dT_millis(uint64_t ms);
bool Init()
Initialize hardware peripheral in the system.
void PrintLineDebugConsole(String s)
Print a message on console used for Debug with a CR+LR at end.
uint16_t GetSupervisorAlarms()
API return Supervisor managed alarms.
t_i2cdev iic_devs[IIC_COUNT]
bool I2CRead(t_i2cdevices device, uint8_t *wbuffer, int wlength, uint8_t *rbuffer, int rlength, bool stop)
Write buffer to I2C bus and read data.
String ReadUART0UntilEOL()
Return a terminated string from communication interface.
void __service_i2c_detect()
Detect all I2C devices on bus.
void PrintDebugConsole(String s)
Print a message on console used for Debug.
bool I2CWrite(t_i2cdevices device, uint8_t *wbuffer, int wlength, bool stop)
Write buffer to I2C bus.
uint64_t batteryStatus_reading_LT
bool WriteUART0(String s)
API to write a string to the communication interfaces.
void Tick()
Tick function must be called periodically.
float currentBatteryCharge
t_i2cdev GetIICDevice(t_i2cdevices device)
Search in the iic_devs list a particular device and return descriptor.
void GetPowerStatus(bool *batteryPowered, float *charge)
API to read battery charge and power supply status.
float GetPIN()
API return pressure on input of MVM.
Driver for the Nuclear Instruments V4 Hardware Board.
float GetBoardTemperature()
API return temperature of the board.
bool DataAvailableOnUART0()
API to read if on the communication interfaces there are bytes to be read.
bool PWMSet(hw_pwm id, float value)
Control PWM device (PV1)
bool EnableWatchdogSupervisor
void WriteSupervisor(uint8_t i_address, uint16_t write_data)
Write a supervisor register.
uint16_t ReadSupervisor(uint8_t i_address)
Read a supervisor register.
bool IOSet(hw_gpio id, bool value)
Set a GPIO Status (IE Control PV6, Alarms, etc)
bool IOGet(hw_gpio id, bool *value)
Get GPIO Status.
void i2c_MuxSelect(uint8_t i)
Switch I2C multiplexer.