Skip to content

Commit

Permalink
ec/ite/adc: move channel definition to .c file
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Kopeć <[email protected]>
  • Loading branch information
mkopec committed May 20, 2024
1 parent 785a0fa commit a771cf5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 11 additions & 0 deletions src/ec/ite/adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@

// Based on chromium EC chip/it83xx/adc.c

const struct Vch adc_channels[] = {
VCH(0),
VCH(1),
VCH(2),
VCH(3),
VCH(4),
VCH(5),
VCH(6),
VCH(7),
};

void adc_init(void) {
ADCSTS &= ~BIT(7);
// Start analog accuracy initialization
Expand Down
11 changes: 1 addition & 10 deletions src/ec/ite/include/ec/adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,7 @@ struct Vch {
}
// clang-format on

const struct Vch adc_channels[] = {
VCH(0),
VCH(1),
VCH(2),
VCH(3),
VCH(4),
VCH(5),
VCH(6),
VCH(7),
};
extern const struct Vch adc_channels[];

void adc_init(void);
int16_t adc_read_channel(uint8_t channel);
Expand Down

0 comments on commit a771cf5

Please sign in to comment.