diff options
author | Theodore Ateba <tf.ateba@gmail.com> | 2017-10-13 19:31:42 +0000 |
---|---|---|
committer | Theodore Ateba <tf.ateba@gmail.com> | 2017-10-13 19:31:42 +0000 |
commit | 1f865bb94655f117f0a8e6f3827072bc319948d4 (patch) | |
tree | cf0748911cb3109be450903461e5c80fec2c1eb2 /os | |
parent | 491e3756b8589e333a7d7b256ecce50df0f3fff9 (diff) | |
download | ChibiOS-1f865bb94655f117f0a8e6f3827072bc319948d4.tar.gz ChibiOS-1f865bb94655f117f0a8e6f3827072bc319948d4.tar.bz2 ChibiOS-1f865bb94655f117f0a8e6f3827072bc319948d4.zip |
AVR: Update ICU low level driver functions names.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10819 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.c b/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.c index 2f7000a58..bb540f8e0 100644 --- a/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.c +++ b/os/hal/ports/AVR/MEGA/LLD/TIMv1/hal_icu_lld.c @@ -112,7 +112,7 @@ static inline void handle_capture_isr(ICUDriver *icup, }
}
-static uint8_t index(ICUDriver *icup) {
+static uint8_t tmrIndex(ICUDriver *icup) {
uint8_t index = 0;
#if AVR_ICU_USE_TIM1 || defined(__DOXYGEN__)
@@ -131,6 +131,7 @@ static uint8_t index(ICUDriver *icup) { if (icup == &ICUD5) return index;
else index++;
#endif
+ return 255;
}
/*===========================================================================*/
@@ -236,7 +237,7 @@ void icu_lld_init(void) { void icu_lld_start(ICUDriver *icup) {
if (icup->state == ICU_STOP) {
- uint8_t i = index(icup);
+ uint8_t i = tmrIndex(icup);
/* Normal waveform generation (counts from 0 to 0xFFFF) */
*regs_table[i].tccra &= ~((1 << WGM11) | (1 << WGM10));
*regs_table[i].tccrb &= ~((1 << WGM13) | (1 << WGM12));
@@ -277,9 +278,9 @@ void icu_lld_stop(ICUDriver *icup) { *
* @notapi
*/
-void icu_lld_enable(ICUDriver *icup) {
+void icu_lld_start_capture(ICUDriver *icup) {
- uint8_t i = index(icup);
+ uint8_t i = tmrIndex(icup);
icup->width = icup->period = 0;
*regs_table[i].tcnt = 0;
*regs_table[i].timsk |= (1 << ICIE1);
@@ -294,9 +295,9 @@ void icu_lld_enable(ICUDriver *icup) { *
* @notapi
*/
-void icu_lld_disable(ICUDriver *icup) {
+void icu_lld_stop_capture(ICUDriver *icup) {
- uint8_t i = index(icup);
+ uint8_t i = tmrIndex(icup);
*regs_table[i].timsk &= ~((1 << ICIE1) | (1 << TOIE1));
}
|