The __delay_cycles() function in the latest mspgcc takes an unsigned long argument but does not allow it to be larger than 65536.

This commit is contained in:
Adam Dunkels 2012-06-04 17:41:12 +02:00
parent 322669df63
commit fd2e238d99
2 changed files with 7 additions and 2 deletions

View file

@ -201,7 +201,7 @@ clock_delay(unsigned int i)
/*---------------------------------------------------------------------------*/
#ifdef __GNUC__
void
__delay_cycles(int c)
__delay_cycles(unsigned long c)
{
c /= 4;
asm("add #-1, r15");

View file

@ -381,7 +381,12 @@ void halLcdActive(void)
// Wait a minimum of 25ms after issuing "start oscillation"
// command (to accomodate for MCLK up to 25MHz)
__delay_cycles(250000);
{
int i;
for(i = 0; i < 5; ++i) {
__delay_cycles(50000);
}
}
LcdInitMacro[3 * 6 + 5] |= BIT3;
LcdInitMacro[3 * 6 + 5] &= ~BIT0;