35 lines
612 B
C
35 lines
612 B
C
#ifndef HALFBRIDGE_H_
|
|
#define HALFBRIDGE_H_
|
|
|
|
/*
|
|
*/
|
|
|
|
/**** Includes ****/
|
|
#include <stdint.h>
|
|
#include "config.h"
|
|
|
|
/**** Public definitions ****/
|
|
typedef struct {
|
|
uint16_t out_voltage;
|
|
uint16_t out_current;
|
|
uint16_t sup_voltage;
|
|
uint16_t sup_current;
|
|
uint16_t out_power;
|
|
uint16_t sup_power;
|
|
uint16_t out_impedance;
|
|
uint8_t low_side_ctrl;
|
|
uint16_t pwm;
|
|
} hb_meas_t;
|
|
|
|
/**** Public function declarations ****/
|
|
void bsp_hb_write_low(uint8_t state);
|
|
void bsp_hb_write_pwm(uint16_t pwm);
|
|
|
|
// Feedback functions
|
|
void bsp_hb_read_meas(hb_meas_t* measurements);
|
|
|
|
#ifdef TESTING
|
|
#endif
|
|
|
|
#endif /* HALFBRIDGE_H_ */
|