Project

General

Profile

Revision 241

implementing uart

View differences:

proj.c
53 53

  
54 54
    int r;
55 55

  
56
    #ifdef DIOGO
57
        uint8_t conf;
58
        if((r = util_sys_inb(0x3F8+3, &conf))) return 1; printf("0x%02X\n", conf);
59
        conf = 0x19; //00011001
60
        printf("0x%02X\n", conf);
61
        if((r = sys_outb(0x3F8+3, conf))) return 1;
62
        uint8_t s;
63
        if((r = util_sys_inb(0x3F8+3, &s))) return 1; printf("S: 0x%02X\n", s);
64
        return 0;
65

  
66
    #endif
67

  
68 56
    font_t *consolas = font_ctor("/home/lcom/labs/proj/media/font/Consolas/xpm2");
69 57
    if(consolas == NULL){ printf("Failed to load consolas\n"); return 1; }
70 58

  
......
168 156
        printf("Date: %d, %02d/%02d/%02d\n", date[0], date[1], date[2], date[3]);
169 157
        */
170 158
        //UART
171
        /*
172
        printf("got %d\n", ser_test_conf(COM1_ADDR));
173
        printf("\n");
174
        printf("got %d\n", ser_test_set(COM1_ADDR, 6, 1, 0, 9800));
175
        tickdelay(micros_to_ticks(1000000));
176
        printf("got %d\n", ser_test_conf(COM1_ADDR));
177
        */
178

  
179

  
159
        if((r = ser_test_conf(COM1_ADDR))) return r;
160
        if((r = ser_test_set(COM1_ADDR, 6, 2, 0, 9800))) return r;
161
        if((r = ser_test_conf(COM1_ADDR))) return r;
180 162
    #endif
181 163

  
182 164
    #ifdef TELMO

Also available in: Unified diff