projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update Releasing with learnings from 1.9.17 release
[fw/altos]
/
src
/
lpc
/
ao_adc_lpc.c
diff --git
a/src/lpc/ao_adc_lpc.c
b/src/lpc/ao_adc_lpc.c
index 6324155977a7a4a538bf3cdbd051e274fae42a33..29d3668cedb1fdff4824dfa5ba2494610604ab81 100644
(file)
--- a/
src/lpc/ao_adc_lpc.c
+++ b/
src/lpc/ao_adc_lpc.c
@@
-79,7
+79,7
@@
static const uint8_t ao_adc_mask_seq[AO_ADC_NUM] = {
1 << 4,
#endif
#if AO_ADC_5
1 << 4,
#endif
#if AO_ADC_5
- 1 <<
6
,
+ 1 <<
5
,
#endif
#if AO_ADC_6
1 << 6,
#endif
#if AO_ADC_6
1 << 6,
@@
-92,7
+92,7
@@
static const uint8_t ao_adc_mask_seq[AO_ADC_NUM] = {
#define sample(id) (*out++ = (uint16_t) lpc_adc.dr[id] >> 1)
static inline void lpc_adc_start(void) {
#define sample(id) (*out++ = (uint16_t) lpc_adc.dr[id] >> 1)
static inline void lpc_adc_start(void) {
- lpc_adc.cr = ((ao_adc_mask_seq[ao_adc_sequence] << LPC_ADC_CR_SEL) |
+ lpc_adc.cr = ((
(uint32_t)
ao_adc_mask_seq[ao_adc_sequence] << LPC_ADC_CR_SEL) |
(AO_ADC_CLKDIV << LPC_ADC_CR_CLKDIV) |
(0 << LPC_ADC_CR_BURST) |
(LPC_ADC_CR_CLKS_11 << LPC_ADC_CR_CLKS) |
(AO_ADC_CLKDIV << LPC_ADC_CR_CLKDIV) |
(0 << LPC_ADC_CR_BURST) |
(LPC_ADC_CR_CLKS_11 << LPC_ADC_CR_CLKS) |
@@
-160,7
+160,7
@@
void
ao_adc_init(void)
{
lpc_scb.sysahbclkctrl |= (1 << LPC_SCB_SYSAHBCLKCTRL_ADC);
ao_adc_init(void)
{
lpc_scb.sysahbclkctrl |= (1 << LPC_SCB_SYSAHBCLKCTRL_ADC);
- lpc_scb.pdruncfg &= ~(1 << LPC_SCB_PDRUNCFG_ADC_PD);
+ lpc_scb.pdruncfg &= ~(1
UL
<< LPC_SCB_PDRUNCFG_ADC_PD);
/* Enable interrupt when channel is complete */
lpc_adc.inten = (1 << LPC_ADC_INTEN_ADGINTEN);
/* Enable interrupt when channel is complete */
lpc_adc.inten = (1 << LPC_ADC_INTEN_ADGINTEN);