aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/adc.c
Commit message (Collapse)AuthorAgeFilesLines
* lpc176x: Update code to use armcm_boot mechanismKevin O'Connor2019-08-221-4/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move irq handler code above irq setupKevin O'Connor2019-08-221-16/+16
| | | | | | Only code movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add more filtering to workaround adc hardware defectKevin O'Connor2019-06-201-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix adc clock divisorKevin O'Connor2019-06-191-2/+2
| | | | | | | | Commit 1096075d changed CONFIG_CLOCK_FREQ to the actual cpu frequency, but that commit failed to update adc.c accordingly. That made the adc run 4 times slower. Make the corresponding change to adc.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Always pass a string to the DECL_CONSTANT() macroKevin O'Connor2019-03-171-1/+1
| | | | | | | | Make it clear that the name of the constant being defined is a string. When the value being defined is also a string, use a new DECL_CONSTANT_STR() macro. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Implement a median filter on ADC readingsKevin O'Connor2019-01-141-18/+68
| | | | | | | The lpc176x ADC is extremely noisy. Implement a 5 order median filter on each ADC read to weed out obviously incorrect readings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Pass gpio id to gpio_peripheral()Kevin O'Connor2019-01-041-1/+1
| | | | | | | Pass the gpio id instead of the bank/pin to gpio_peripheral(). This is in keeping with other ARM ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move enable_peripheral_clock to main.cKevin O'Connor2019-01-041-2/+2
| | | | | | | Move and rename function to enable_pclock() - in keeping with other ARM ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move ADC code to new adc.c fileKevin O'Connor2019-01-041-0/+96
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>