Changeset 429acb9 in mainline for console/gcons.c


Ignore:
Timestamp:
2006-06-03T17:38:24Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f36e90
Parents:
dc5a0fe1
Message:

Added nice kernel console switching, currently works on fb devices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • console/gcons.c

    rdc5a0fe1 r429acb9  
    126126        if (!use_gcons)
    127127                return;
    128        
    129         draw_stat(active_console, CONS_IDLE);
     128
     129        if (active_console != -1)
     130                draw_stat(active_console, CONS_IDLE);
    130131        active_console = consnum;
    131132        draw_stat(consnum, CONS_ACTIVE);
     
    135136}
    136137
     138/** Notification function that gets called on new output to virtual console */
    137139void gcons_notify_char(int consnum)
    138140{
     
    144146
    145147        console_has_input[consnum] = 1;
     148
     149        if (active_console == -1)
     150                return;
     151
    146152        draw_stat(consnum, CONS_HAS_INPUT);
    147153       
    148154        vp_switch(console_vp);
    149 }
    150 
     155
     156}
     157
     158/** Change to kernel console */
     159void gcons_in_kernel(void)
     160{
     161        draw_stat(active_console, CONS_IDLE);
     162        active_console = -1; /* Set to kernel console */
     163        vp_switch(0);
     164}
     165
     166/** Draw a PPM pixmap to framebuffer
     167 *
     168 * @param logo Pointer to PPM data
     169 * @param size Size of PPM data
     170 * @param x Coordinate of upper left corner
     171 * @param y Coordinate of upper left corner
     172 */
    151173static void draw_pixmap(char *logo, size_t size, int x, int y)
    152174{
Note: See TracChangeset for help on using the changeset viewer.