Subversion Repositories HomeAutomation

Rev

Rev 1789 | Rev 1910 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1789 Rev 1809
Line 322... Line 322...
322
}
322
}
323
#endif
323
#endif
324
 
324
 
325
void act_ks0108_Init(void)
325
void act_ks0108_Init(void)
326
{
326
{
327
    ///TODO: Initialize hardware etc here
327
    /* Set up PWM controlling brightness */
328
    // Backlight
328
#if GRAPHICS_DRIVER==KS0108
329
    TCCR0A |= (1<<COM0A1)|(1<<WGM01)|(1<<WGM00);
329
    TCCR0A |= (1<<COM0A1)|(1<<WGM01)|(1<<WGM00);
330
    TCCR0B |= (1<<CS00);
330
    TCCR0B |= (1<<CS00);
331
    OCR0A = act_ks0108_INITIAL_BACKLIGHT;
331
    OCR0A = act_ks0108_INITIAL_BACKLIGHT;
332
    DDRD |= (1<<PD6);
332
    DDRD |= (1<<PD6);
-
 
333
#endif
-
 
334
#if GRAPHICS_DRIVER==DOTMATRIX
-
 
335
    TCCR0A |= (1<<COM0B1)|(1<<WGM01)|(1<<WGM00);
-
 
336
    TCCR0B |= (1<<CS00);
-
 
337
    OCR0B = 0xff-act_ks0108_INITIAL_BACKLIGHT;
-
 
338
    DDRD |= (1<<PD5);
-
 
339
#endif
333
 
340
 
334
 
341
 
335
#if act_ks0108_USE_EXTERNAL_EEPROM==1
342
#if act_ks0108_USE_EXTERNAL_EEPROM==1
336
    TWI_Master_Initialise();
343
    TWI_Master_Initialise();
337
    uint8_t temp = 0;
344
    uint8_t temp = 0;