| 1234567891011121314151617181920 |
- #ifndef _VBUS_SENSOR_H__
- #define _VBUS_SENSOR_H__
- #define VBUS_PARTITIONING_FACTOR 0.0522f /*!< It expresses how
- much the Vbus is attenuated
- before being converted into
- digital value */
- typedef struct {
- float voltage_avg;
- int avg_count;
- }vbus_t;
- void vbus_sensor_init(void);
- void vbus_sample_voltage(void);
- float vbus_get_voltage(void);
- #endif /* _VBUS_SENSOR_H__ */
|