bool is_command_mode_panel(void)
{
    char panel_name[20] = "unknown";
    if(get_hw_config("lcd/name",panel_name,20,NULL))
    {
        if(!strcmp(panel_name, "spanel"))
            return true;
    }

    if(get_hw_config("lcd/name",panel_name,20,NULL))
    {
        if(!strcmp(panel_name, "mdv20"))
            return false;
    }

    return false;
}
static bool get_leds_config_name(void)
{
    if(get_hw_config("leds/leds_type", config_name, LEDS_CONFIG_NAME_LENGTH, NULL))
    {
        return true;
    }
    else
    {
        return false;
    }
}
static bool panel_get_lcd_config_name(void)
{
    if(get_hw_config("lcd/name",config_name,PANEL_LCD_NAME_LENGTH,NULL))
    {   
        HD_PRINT("Function (%s) (config_name=%s).\n",__FUNCTION__,config_name);
        return true;
    }
    else 
    {
        HD_PRINT(KERN_ERR"Get config name faild.\n");
        return false;
    }
}
static int panel_get_lcd_number(void)
{
    unsigned int num;

    if(get_hw_config("lcd/number",&num,sizeof(num),NULL))
    {
        return num;
    }
    else 
    {
        HD_PRINT(KERN_ERR"Get config faild Num = %d \n",num);
        return -1;
    }
}
Example #5
0
/* ------------------------------
   Initialization and finalization fucntions
   ------------------------------------------------------------*/
void
mount()
{
    char *hw_config;
    int status, i; 

    /* Hardware initialization */
    hw_config = get_hw_config();
    status = init_hardware(hw_config);
    ffatal(status, "error in hardware initialization with %s\n", hw_config);

    /* Interrupt handlers */
    for(i=0; i<16; i++)
	IRQVECTOR[i] = emptyIT;
    
    /* Allows all IT */
    _mask(1);

    /* Load MBR and current volume */
    load_mbr();
    load_current_volume();
}