You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
503 B
28 lines
503 B
4 months ago
|
#ifndef POWER_SOPPLY_H
|
||
|
#define POWER_SOPPLY_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stdbool.h>
|
||
|
#include <stddef.h>
|
||
|
#include "power_source.h"
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
PS_BASE_MAIN = 0,
|
||
|
PS_BASE_SEC,
|
||
|
PS_BASE_NUM,
|
||
|
} power_base_e;
|
||
|
|
||
|
void power_supply_init(void);
|
||
|
void power_supply_run(void);
|
||
|
|
||
|
power_source_s *ps_mgr_power_ps(uint8_t port_num);
|
||
|
|
||
|
static inline int power_source_get(power_source_s *ps, ps_cfg_type_e type, void *data)
|
||
|
{
|
||
|
ps->ops->get(ps, type, data);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
#endif /* POWER_SOPPLY_H */
|