static int s6e63j0x03_displayon(struct mipi_dsim_device *dsim)
{
	printk("%s was called\n", __func__);

	init_lcd(dsim);
	return 1;
}
示例#2
0
int     main(int argc, char** argv)
{
    u8          status;
    u8          prev_status;

    TRISDbits.TRISD8 = INPUT;               //Bouton INPUT
    TRISFbits.TRISF1 = OUTPUT;              //LED INPUT
    LATFbits.LATF1 = GND;                   //Etat initial = éteint

    INTCONbits.MVEC = TRUE;           //Multi-vector interrupt mode
    asm volatile("ei");               //Autorise les macro-ASM (interruptions)

    init_lcd();
    init_dac();
    init_oscil();
    init_MIDI();

    tab_create(tab);                        // Remplit le tableau avec les périodes

    while(PROCESS)
    {
        status = PORTDbits.RD8;
        if (!status && prev_status)
        {                                   // Appuyer sur le bouton change la fréquence
            if (cursor == 100)
                cursor = 10000;
            else
                cursor /= 10;
        }
        prev_status = status;
        WDTCONbits.WDTCLR = TRUE;       //Clear Watchdog
    }
}
void main()
{
  TRISB=0x00;
	TRISA=0x3C;
	TRISC=0x00;
   ADCON1=0x06;   
  init_lcd();
  start_sw=0;
  init();
  GIE=1;
  PEIE=1;

  cmd_wr(0xc0);
  for(i=0;i<9;i++)
  {
   data_wr(cnt[i]);
  }
  //test_display();
  //disp_sw();
  while(1)
  {
  	get_key();
	keyprocess();	
  }  
}
示例#4
0
int main()
{
   	//short len;

	init_gpio();	
	init_lcd();

  	//len = strlen((char *)dsp_afp);
	dato_lcd(dsp_afp, LARGO);
	delay(1000);
	write_lcd(CLEAR, CTRL_WR);	    	/*comando Clear Dply*/
	delay(100);  				    	/*esperar 10ms*/
  	//len = strlen((char *)enya);
	dato_lcd(enya, LARGO);
	delay(1000);
	write_lcd(CLEAR, CTRL_WR);	    	/*comando Clear Dply*/
	delay(100);  				    	/*esperar 10ms*/
  	//len = strlen((char *)h_no_enc); 		                   
	dato_lcd(h_no_enc, LARGO);
	delay(1000);
	write_lcd(CLEAR, CTRL_WR);	    	/*comando Clear Dply*/
	delay(100);  				    	/*esperar 10ms*/
  	//len = strlen((char *)busq); 		                   
	dato_lcd(busq, LARGO);
	delay(3000);
	write_lcd(CLEAR, CTRL_WR);	    	/*comando Clear Dply*/
	delay(100);  				    	/*esperar 10ms*/
	write_lcd(DPLY_OFF, CTRL_WR);
	delay(1);  				    		/*esperar 100us*/
	HDR = 0x0000;

}/*Fin main*/
示例#5
0
文件: test.c 项目: repraze/avr-miniUI
void main() {
    /* Disable JTAG in software, so that it does not interfere with Port C */
    MCUCR |= _BV(JTD);
    MCUCR |= _BV(JTD);


    init_stdio_uart1();

    init_lcd();
    set_orientation(East);



    scanswitch_init();

    button_map bmap;
    bmap.left 	= 0;
    bmap.right 	= 0;
    bmap.up 	= 0;
    bmap.down 	= 0;
    bmap.center = 0;
    bmap.wheel_d= 0;
    bmap.has_pressed_button=0;

    init_miniUI();

    display_menu_at("test;tes2;tes3",1, 10,10,2);
}
示例#6
0
int main(int argc, char** argv) {

//    BMXPUPBA = BMXPFMSZ - 0x4000;

//  sizeof(presets) = 17820 bits
//  0x5000 = 20480

    INTCONbits.MVEC = TRUE;           //Multi-vector interrupt mode
    asm volatile("ei");               //Autorise les macro-ASM (interruptions)

//    memcpy(&presets, flash_adress, sizeof(presets));

    init_Menus();
    init_pins();
    init_lcd();
    init_preset();
    create_tab_env();
    create_tab_frequenz();
    create_tab_period();
    init_MIDI();
//    init_pwm();
    init_dac();
    update_menu();

    while (42)
    {
        boutons();
        processEncodeur();
        WDTCONbits.WDTCLR = 1;
    }
    return (0);
}
示例#7
0
int main() {
    _delay_ms(100);  //little delay for the rfm12 to initialize properly
    rfm12_init();    //init the RFM12
    _delay_ms(100);
    init_lcd();
    init_timer();
    sei(); 
    set_orientation(East);
    put_string((char*)"Initialising...\n");
    
    char random[120] = "hello aaron rowland, this is a string which should ";
    char test[26] = "0123456789012345678901234";
    int i = 23456;

    char Rpacket[150];
    SendPacket(THISDEVICE, random);
    // while(1) {
    //     if(RecievePacket(Rpacket)) {
    //         put_string("PACKET RECEIVED!!!!!\n");
    //         put_string(Rpacket);
    //     }
    // }
    return 0;

}
示例#8
0
/**
 * 主函数,显示一些东西
 * @return
 */
int main(void)
{
    uint8_t ch;
    //0. 初始化LCD
    init_lcd();
    //1. 最简单的字符输出测试 (写数据)
    set_pos(0x00);
    write_str("hello world");
    _delay_ms(100);
    //2. 读取数据测试 (读数据)
    _delay_ms(100);
    set_pos(0x06);     //设置读取的位置,第1行6列,'w'的位置
    _delay_ms(1000);
    ch = get_data();
    set_pos(0x0D);     //设置光标位置
    set_data(ch);
    _delay_ms(1000);
    //3. 自定义字符测试 (写内存+读内存)
    init_chardb();     //初始化自定义的字符集
    set_pos(0x40);     //设置在第2行还是显示
    int i;
    for ( i =0; i<0b111+1; i++) {
        set_data(i);
        //_delay_ms(50);
    }
    //4. 读取光标位置 (读地址/位置) I处即光标所在地址
    _delay_ms(1000);
    char str[5];
    set_pos(0x4a);
    ch=get_pos();
    sprintf(str,"I=%02XH",ch);
    write_str(str);
    return 0;
}
示例#9
0
//board bring-up
void init_system(){
	init_uart(0);//configure uart, check uart.h
	init_uart(1);//configure uart, check uart.h
	init_adc();//initialize ADC, check adc.h
	init_lcd();//init lcd
	init_relays();//init toggle relays
}
示例#10
0
文件: fb.c 项目: Keripo/linux-ipod
int __init ipodfb_init(void)
{
	fb_info.gen.fbhw = &ipod_switch;

	fb_info.gen.fbhw->detect();

	strcpy(fb_info.gen.info.modename, "iPod");

	fb_info.gen.info.changevar = NULL;
	fb_info.gen.info.node = -1;
	fb_info.gen.info.fbops = &ipodfb_ops;
	fb_info.gen.info.disp = &disp;
	fb_info.gen.info.switch_con = &fbgen_switch;
	fb_info.gen.info.updatevar = &fbgen_update_var;
	fb_info.gen.info.blank = &fbgen_blank;
	fb_info.gen.info.flags = FBINFO_FLAG_DEFAULT;

	/* This should give a reasonable default video mode */
	fbgen_get_var(&disp.var, -1, &fb_info.gen.info);
	fbgen_do_set_var(&disp.var, 1, &fb_info.gen);
	fbgen_set_disp(-1, &fb_info.gen);
	fbgen_install_cmap(0, &fb_info.gen);

	if ( register_framebuffer(&fb_info.gen.info) < 0 ) {
		return -EINVAL;
	}

	init_lcd();

	printk(KERN_INFO "fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.gen.info.node), fb_info.gen.info.modename);

	/* uncomment this if your driver cannot be unloaded */
	/* MOD_INC_USE_COUNT; */
	return 0;
}
示例#11
0
void init_all() {
	init();
	motor_init();
	ir_init();
	init_lcd();
	wait();
}
示例#12
0
int main(int argc, char **argv) {
    if(wiringPiSetup() == -1) {
        printf("wiringPiSetup() failed\n");
        return EXIT_FAILURE;
    }

    // 540kHz speed - recomended by ST7920 spec
    //if ((lcd_fd = wiringPiSPISetupMode(0, 540000, 0x07)) < 0) {
    if ((lcd_fd = wiringPiSPISetup(0, 540000)) < 0) {
        printf("Can't open the SPI bus\n");
        return EXIT_FAILURE;
    }
    
    char mode = 0x07;
    ioctl(lcd_fd, SPI_IOC_WR_MODE, &mode);

    init_gpio();
    reset_lcd();
    init_lcd();
    
    set_extended_mode(0, 0, 0);
    set_extended_mode(0, 1, 1);

    clear_lcd();

    show_image(raspberry_pix);

    return EXIT_SUCCESS;
}
示例#13
0
static DISP_STATUS dbi_init_old(UINT32 fbVA, UINT32 fbPA, BOOL isLcmInited)
{
	printf("%s\n", __func__);
    if (!disp_drv_dbi_init_context()) 
        return DISP_STATUS_NOT_IMPLEMENTED;
    init_io_pad();
	init_io_driving_current();
    init_lcd();
		printf("%s, %d\n", __func__, __LINE__);

    if (NULL != lcm_drv->init && !isLcmInited) {
        lcm_drv->init();
    }
		printf("%s, %d\n", __func__, __LINE__);

    init_lcd_te_control();
		// what the hell???
		#if 0
    DPI_PowerOn();
    DPI_PowerOff();
    DSI_PowerOn();
    DSI_PowerOff();
		#endif
		printf("%s, %d\n", __func__, __LINE__);

    return DISP_STATUS_OK;
}
示例#14
0
int main(void)
{
// Declare your local variables here

// init the external interrupt
MCUCR |= (1<<ISC01) | (1<<ISC00); // rising edge INT0 ATmega32
GICR |= (1<<INT0);
sei(); // enable interrupts

//init_frequencemeter_8bits();
init_frequencemeter_16bits();

// init output (for test)
//DDRA=0xFF; // port A en sortie
//PORTA=0xFF; // switch off led

init_lcd();


while (1)
      {
      display();
      asm("nop");          // Inline assembly example
      asm("nop");          // Inline assembly example
      };

return 0;
}
示例#15
0
文件: asic.c 项目: zyh329/CEmu
static void plug_devices(void) {
    /* Port ranges 0x0 -> 0xF */
    port_map[0x0] = init_control();
    port_map[0x1] = init_flash();
    port_map[0x2] = init_sha256();
    port_map[0x3] = init_usb();
    port_map[0x4] = init_lcd();
    port_map[0x5] = init_intrpt();
    port_map[0x6] = init_watchdog();
    port_map[0x7] = init_gpt();
    port_map[0x8] = init_rtc();
    port_map[0x9] = init_protected();
    port_map[0xA] = init_keypad();
    port_map[0xB] = init_backlight();
    port_map[0xC] = init_cxxx();
    port_map[0xD] = init_dxxx();
    port_map[0xE] = init_exxx();
    port_map[0xF] = init_fxxx();

    reset_proc_count = 0;

    /* Populate reset callbacks */
    add_reset_proc(lcd_reset);
    add_reset_proc(keypad_reset);
    add_reset_proc(gpt_reset);
    add_reset_proc(rtc_reset);
    add_reset_proc(watchdog_reset);
    add_reset_proc(cpu_reset);

    gui_console_printf("[CEmu] Initialized APB...\n");
}
void main()
{
  TRISB=0x00;
	TRISA=0x3C;
	TRISC=0x00;
  ADCON1=0x06;
  init_lcd();
  init();
  GIE=1;
  PEIE=1;
  //test_display();

  cmd_wr(0x80);
  for(i=0;i<=12;i++)
  {
   data_wr(cnt[i]);
  }

  while(1)
  {
  	while(key_ready!=1);
	a=key_code;
	ds1=ascii_tab[a];
	key_release();
	lcd_disp();
  }  
}
示例#17
0
文件: Lab5.c 项目: cucucachu/CPE416
void all_init() {
	init();
	ir_init();
	init_lcd();
	motor_init();
	wait();
	
}
示例#18
0
void SystemInit()
{
	FLASH->ACR = 0x00000012;
	init_clock();
	init_lcd();
	init_port();
	init_usart();
}
static int s6e3fa0_displayon(struct mipi_dsim_device *dsim)
{
#ifdef CONFIG_DECON_MIC
    init_lcd_mic(dsim);
#else
    init_lcd(dsim);
#endif
    return 1;
}
示例#20
0
文件: flash.c 项目: arian009/GroupG
int main(void) {
	init_lcd();
	set_orientation(North);
	rectangle r = {get_width() * 0.2, get_width() * 0.8, get_height() * 0.2, get_height() * 0.8};
	do {
		fill_rectangle(r, YELLOW);
		_delay_ms(1);
	} while(1);
}
示例#21
0
void main(){
	init_lcd();
	clear_screen();
	choose_screen(1);
	write_command(x|0);
	write_command(y|0);
	write_data(0x01<<0);
	while(1);
}
示例#22
0
int checkboard(void)
{
	puts("Board: ");
	puts("AMCORE v.001(alpha)\n");

	init_lcd();

	return 0;
}
void main()
{
 init_lcd();

 while(1)
 {
  read_adc();
  display();
 }
}
示例#24
0
int main() {
	init_lcd();
	init_watch(&watch_state);
	disp_watch(&watch_state);
	P1 = 0x0F;										// LEDs as outputs, switches as inputs.
	while(1) {
		update_watch(&watch_state);
		disp_watch(&watch_state);
	}
}
示例#25
0
int main(int argc, char** argv) {

    init_pins();
    init_lcd();
    lcd_print("SynthyTwo");
    lcd_goto(1, 2);
    lcd_print("Coming Soon...");
    while (42)
        ;
    return (EXIT_SUCCESS);
}
示例#26
0
文件: review.c 项目: arian009/GroupG
int main(void) {
	init_lcd();
	set_orientation(South);
	rectangle r = {
		20, 20 + RECT_WIDTH - 1,
		20, 20 + RECT_HEIGHT - 1
	};
	Box b = {r, 1, 1};
	rectangle clear = {0, 0, 0, 0};
	do {
		if(b.vx > 0 && (b.r.right * SCALE) >= (get_width() - SCALE)) {
			b.vx = - b.vx;
		} else if(b.vx < 0 && (b.r.left * SCALE) <= 0) {
			b.vx = - b.vx;
		}
		if(b.vy > 0 && (b.r.bottom * SCALE) >= get_height()) {
			b.vy = - b.vy;
		} else if(b.vy < 0 && (b.r.top * SCALE) <= 0) {
			b.vy = - b.vy;
		}
		if(b.vx > 0) {
			clear.left = b.r.left * SCALE;
			clear.right = (b.r.left + 1) * SCALE;
			clear.top = b.r.top * SCALE;
			clear.bottom = b.r.bottom * SCALE;
			fill_rectangle(clear, BLACK);
		} else if(b.vx < 0) {
			clear.right = b.r.right * SCALE;
			clear.left = (b.r.right - 1) * SCALE;
			clear.top = b.r.top * SCALE;
			clear.bottom = b.r.bottom * SCALE;
			fill_rectangle(clear, BLACK);
		}
		if(b.vy > 0) {
			clear.left = b.r.left * SCALE;
			clear.right = b.r.right * SCALE;
			clear.top = b.r.top * SCALE;
			clear.bottom = (b.r.top + 1) * SCALE;
			fill_rectangle(clear, BLACK);
		} else if(b.vy < 0) {
			clear.left = b.r.left * SCALE;
			clear.right = b.r.right * SCALE;
			clear.bottom = b.r.bottom * SCALE;
			clear.top = (b.r.bottom - 1) * SCALE;
			fill_rectangle(clear, BLACK);
		}
		b.r.left += b.vx;
		b.r.right += b.vx;
		b.r.top += b.vy;
		b.r.bottom += b.vy;
		fill_rectangle_indexed_scale(b.r, pic, SCALE);
		_delay_ms(50);
	} while(1);
}
示例#27
0
/* Called by our USR2 signal handler to toggle IR/LCD support on and off
*/
void toggle_handler(int signal_number) {
    if (use_lcdd_menu) {
        close_lcd();
        close_lirc();
    } else {
        use_lcdd_menu = true;
        using_lirc = true;
        init_lcd();
        init_lirc();
    }
}
示例#28
0
int main(void)
{
	DelayInit();
	init_lcd();
	init_rotary_encoder();
	
	while (1)
	{
		lcd_update();
	}
}
示例#29
0
void perform_inits(void)
{	
	g_defined_temp = 35;
	g_current_temp = 0.;
	init_usart(BAUDRATE, TRANSMIT_RATE, DATA_BITS, STOP_BITS, PARITY_BITS);
	init_peltier_port();
	init_motors();
	init_motors_timer();
	init_lcd();
	sei();
}
示例#30
0
文件: main.c 项目: noah95/mc1
/**
 * @brief      Inits everything
 */
void init ()
{
	static FILE fd_stdout= FDEV_SETUP_STREAM(serial_putchar, NULL, _FDEV_SETUP_WRITE);
	stdout = &fd_stdout;
	static FILE fd_lcdout= FDEV_SETUP_STREAM(lcd_putchar, NULL, _FDEV_SETUP_WRITE);
	LCD = &fd_lcdout;
	
	inti_send_buf();
	initIO();

	init_lcd();
}