1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-17 05:15:18 +03:00
* Fixed peripheral frequency.
 * Enabled external module driver: None and PPM protocols working. PPM timing and polarity verified.
This commit is contained in:
Damjan Adamic 2016-03-07 20:42:49 +01:00
parent 0b163ba067
commit 77d892a5de
7 changed files with 195 additions and 117 deletions

View file

@ -450,6 +450,40 @@ int cliDisplay(const char ** argv)
}
}
#endif
else if (!strcmp(argv[1], "tim")) {
int timerNumber;
if (toInt(argv, 2, &timerNumber) > 0) {
TIM_TypeDef * tim = TIM1;
switch (timerNumber) {
case 1:
tim = TIM1;
break;
case 2:
tim = TIM2;
break;
default:
return 0;
}
serialPrint("TIM%d", timerNumber);
serialPrint(" CR1 0x%x", tim->CR1);
serialPrint(" CR2 0x%x", tim->CR2);
serialPrint(" DIER 0x%x", tim->DIER);
serialPrint(" SR 0x%x", tim->SR);
serialPrint(" EGR 0x%x", tim->EGR);
serialPrint(" CCMR1 0x%x", tim->CCMR1);
serialPrint(" CCMR2 0x%x", tim->CCMR2);
serialPrint(" CNT 0x%x", tim->CNT);
serialPrint(" ARR 0x%x", tim->ARR);
serialPrint(" PSC 0x%x", tim->PSC);
serialPrint(" CCER 0x%x", tim->CCER);
serialPrint(" CCR1 0x%x", tim->CCR1);
serialPrint(" CCR2 0x%x", tim->CCR2);
serialPrint(" CCR3 0x%x", tim->CCR3);
serialPrint(" CCR4 0x%x", tim->CCR4);
}
}
else if (toLongLongInt(argv, 1, &address) > 0) {
int size = 256;
if (toInt(argv, 2, &size) >= 0) {