battery:add FAR for battery_gauge_operations_s

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
This commit is contained in:
dulibo1 2023-08-21 18:36:46 +08:00 committed by Xiang Xiao
parent 5dbffd01b2
commit ea7f6c5b07

View File

@ -93,31 +93,33 @@ struct battery_gauge_operations_s
{ {
/* Return the current battery state (see enum battery_status_e) */ /* Return the current battery state (see enum battery_status_e) */
int (*state)(struct battery_gauge_dev_s *dev, int *status); CODE int (*state)(FAR struct battery_gauge_dev_s *dev, FAR int *status);
/* Return true if the batter is online */ /* Return true if the batter is online */
int (*online)(struct battery_gauge_dev_s *dev, bool *status); CODE int (*online)(FAR struct battery_gauge_dev_s *dev, FAR bool *status);
/* Current battery voltage */ /* Current battery voltage */
int (*voltage)(struct battery_gauge_dev_s *dev, b16_t *value); CODE int (*voltage)(FAR struct battery_gauge_dev_s *dev, FAR b16_t *value);
/* Battery capacity */ /* Battery capacity */
int (*capacity)(struct battery_gauge_dev_s *dev, b16_t *value); CODE int (*capacity)(FAR struct battery_gauge_dev_s *dev,
FAR b16_t *value);
/* Battery current */ /* Battery current */
int (*current)(struct battery_gauge_dev_s *dev, b16_t *value); CODE int (*current)(FAR struct battery_gauge_dev_s *dev, FAR b16_t *value);
/* Battery temp */ /* Battery temp */
int (*temp)(struct battery_gauge_dev_s *dev, b8_t *value); CODE int (*temp)(FAR struct battery_gauge_dev_s *dev, FAR b8_t *value);
/* Battery chipid */ /* Battery chipid */
int (*chipid)(struct battery_gauge_dev_s *dev, unsigned int *value); CODE int (*chipid)(FAR struct battery_gauge_dev_s *dev,
FAR unsigned int *value);
}; };
/* This structure defines the battery driver state structure */ /* This structure defines the battery driver state structure */