Subversion Repositories freemyipod

Rev

Rev 388 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 388 Rev 419
Line 59... Line 59...
59
}
59
}
60
 
60
 
61
static void lcd_send_data(uint16_t data)
61
static void lcd_send_data(uint16_t data)
62
{
62
{
63
    while (LCDSTATUS & 0x10);
63
    while (LCDSTATUS & 0x10);
64
    LCDWDATA = data;
64
    LCDWDATA = (data & 0xff) | ((data & 0x7f00) << 1);
65
}
65
}
66
 
66
 
67
static uint32_t lcd_detect()
67
static uint32_t lcd_detect()
68
{
68
{
69
    return (PDAT6 & 0x30) >> 4;
69
    return (PDAT6 & 0x30) >> 4;
Line 140... Line 140...
140
 
140
 
141
void lcd_shutdown()
141
void lcd_shutdown()
142
{
142
{
143
    displaylcd_sync();
143
    displaylcd_sync();
144
    uint32_t type = lcd_detect();
144
    uint32_t type = lcd_detect();
145
    if (type == 3)
145
    if (type & 2)
146
    {
146
    {
147
        lcd_send_cmd(0x7);
147
        lcd_send_cmd(0x7);
148
        lcd_send_data(0x172);
148
        lcd_send_data(0x172);
149
        lcd_send_cmd(0x30);
149
        lcd_send_cmd(0x30);
150
        lcd_send_data(0x3ff);
150
        lcd_send_data(0x3ff);