Issue 87 fixed

This commit is contained in:
bsongis
2012-08-22 10:38:54 +00:00
parent bd56fcab06
commit 0727523472
3 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
#define PROMPT_SYSTEM_BASE 230
#define PROMPT_CUSTOM_BASE 256
#define pushCustomPrompt(p) pushPrompt(PROMPT_CUSTOM_BASE+p)
#define pushCustomPrompt(p) pushPrompt(PROMPT_CUSTOM_BASE+(p))
extern void pushPrompt(uint16_t prompt);
extern bool isPlaying();
+7 -5
View File
@@ -173,7 +173,7 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation
if (!IS_PXX_PROTOCOL(s_current_protocol) && !IS_DSM2_PROTOCOL(s_current_protocol)) {
// cli is not needed because for these 2 protocols interrupts are not enabled when entering here
// cli is not needed because for PPM protocols, interrupts are not enabled when entering here
#if defined(PCBV4)
TIMSK1 |= (1<<OCIE1A);
@@ -206,8 +206,10 @@ void setupPulsesPPM(uint8_t proto)
uint32_t rest = 22500u*2 - q; // Minimum Framelen=22.5ms
#if defined(PCBV4)
OCR5A = (uint16_t)0x7d * (45+g_model.ppmFrameLength-g_timeMainLast-2/*1ms*/);
TCNT5 = 0;
if (proto == PROTO_PPM) {
OCR5A = (uint16_t)0x7d * (45+g_model.ppmFrameLength-g_timeMainLast-2/*1ms*/);
TCNT5 = 0;
}
#endif
rest += (int32_t(g_model.ppmFrameLength))*1000;
@@ -782,7 +784,7 @@ void setupPulses()
TIMSK1 &= ~0x3C; // All interrupts off
TIMSK1 &= ~(1<<OCIE1C) ; // COMPC1 off
TIFR1 = 0x2F;
TIMSK1 |= 0x10; // Enable COMPA
TIMSK1 |= (1<<OCIE1A); // Enable COMPA
#else
TIMSK &= ~0x3C ; // All interrupts off
ETIMSK &= ~(1<<OCIE1C) ; // COMPC1 off
@@ -826,7 +828,7 @@ void setupPulses()
#if defined(PCBV4)
TIMSK1 &= ~0x3C; // All interrupts off
TIFR1 = 0x2F;
TIMSK1 |= 0x10; // Enable COMPA
TIMSK1 |= (1<<OCIE1A); // Enable COMPA
#else
TIMSK &= ~0x3C; // All interrupts off
TIFR = 0x3C;
+3
View File
@@ -68,6 +68,9 @@ inline const pm_char *SDCARD_ERROR(FRESULT result)
return STR_SDCARD_ERROR;
}
// TODO move the ARM function definition here (when cpp)
extern void sdPoll10mS();
#if defined(PCBARM) && !(defined(SIMU))
extern "C" {
extern uint32_t sd_card_ready();