31 #include "firmwares/fixedwing/main_fbw.h"
35 #define MPPT_SLAVE_ADDR 0x40
37 #define MPPT_MODE_ADDR 0xf
57 #include "pprzlink/messages.h"
64 #define MPPT_STATUS_IDLE 0
65 #define MPPT_STATUS_WRITING 1
66 #define MPPT_STATUS_ASKING 2
67 #define MPPT_STATUS_READING 3
static int16_t MPPT_data[NB_DATA]
static void MPPT_ask(void)
uint8_t MPPT_mode
0: VBat (mV) 1: IBat (mA) 2: PBat (mW) 3: VSol (mV) 4: ISol (mA) 5: PSol (mW) 6: IConv (mA) 7: PConv ...
#define MPPT_STATUS_ASKING
static uint8_t MPPT_status
A value different from 0 is a request from this mode.
struct i2c_transaction mppt_trans
static uint8_t data_index
#define MPPT_STATUS_WRITING
#define MPPT_STATUS_READING
Solar cells MPTT monitoring.
#define MPPT_ITOTAL_INDEX
Common code for AP and FBW telemetry.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
@ I2CTransSuccess
transaction successfully finished by I2C driver
I2C transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.