本文整理汇总了C++中display_init函数的典型用法代码示例。如果您正苦于以下问题:C++ display_init函数的具体用法?C++ display_init怎么用?C++ display_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: wmt_display_main
static int wmt_display_main (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
int tmp;
switch (argc) {
case 0:
case 1:
printf ("Usage:\n%s\n", cmdtp->usage);
return 0;
default:
if (strncmp(argv[1], "init", 2) == 0) {
if (argc == 3) {
if (strcmp(argv[2], "force") == 0) {
display_init(1, 1);
return 0;
}
}
display_init(1, 0);
return 0;
}
if (strncmp(argv[1], "clear", 2) == 0) {
display_clear();
return 0;
}
if (strncmp(argv[1], "show", 2) == 0) {
if (4 == argc) {
g_logo_x = simple_strtoul(argv[2], NULL, 10);
g_logo_y = simple_strtoul(argv[3], NULL, 10);
printf("(%d, %d) ", g_logo_x, g_logo_y);
} else {
g_logo_x = -1;
g_logo_y = -1;
}
display_show(0);
return 0;
}
if (strncmp(argv[1], "setpwm", 2) == 0) {
if (argc == 3) {
if (argv[2] != NULL) {
display_set_pwm(argv[2], 1);
return 0;
}
} else if (argc == 4) {
tmp = simple_strtoul(argv[2], NULL, 10);
if (argv[3] != NULL) {
display_set_pwm(argv[3], tmp);
return 0;
}
}
}
printf ("Usage:\n%s\n", cmdtp->usage);
return 0;
}
return 0;
}
开发者ID:RAR,项目名称:apc-8750,代码行数:55,代码来源:wmt_cmd_display.c
示例2: main
int main(void) {
sei(); // enable interrupts
leds_init();
pwm_init();
bot_init();
i2c_init();
if (display_init()!=0) {
leds_set_displaylight(50);
if (display_type==2) {
gfx_init();
}
}
gfx_fill(0x00);
gfx_move(15, 0);
gfx_set_proportional(1);
gfx_print_text("nibo");
gfx_set_proportional(0);
uint8_t pos=0;
uint8_t state=0;
gfx_term_print("Move 0\n");
nds3_move(0);
while (nds3_get_busy()) {
delay(1);
}
while (1) {
gfx_draw_mode(GFX_DM_JAM2);
check_voltage();
//gfx_term_print("Measure 90, 15\n");
delay(1);
nds3_measure(180, 1);
while (nds3_get_busy()) {
delay(1);
}
delay(1);
//gfx_term_print("Read -90, 15\n");
do_plot();
delay(1);
nds3_measure(0, 1);
while (nds3_get_busy()) {
delay(1);
}
delay(1);
//gfx_term_print("Read 90, 15\n");
nds3_read(0, 15);
do_plot();
}
}
开发者ID:firemind,项目名称:LabyrinthNibo,代码行数:60,代码来源:main.c
示例3: main
//**************************************************************
// main()
//**************************************************************
int main(){
#define Adresse 0x9E // evtl 9F für schreiben?
#define Read 1
#define Write 0
unsigned char ucTemp1,ucTemp2; // Deklaration der Variablen
display_init(); // Initialisiere Display
int i;
while(1) {
signed int avg = 0;
for(i = 0; i < 64; i++) {
// Setzen der Startbedingung und warten bis slave antwortet mit ACK0
while(i2c_start(Adresse+Read));
ucTemp1 = i2c_rbyte(0); // Erstes Byte einlesen
ucTemp2 = i2c_rbyte(1); // Zweites Byte einlesen
i2c_stop(); // I2C wieder freigeben
// Ausgabe der gelesenen Werte
display_set_cursor(0, 0);
print_temp(tempwert(ucTemp1, ucTemp2));
avg += tempwert(ucTemp1, ucTemp2);
delay5ms(100); // Verzögerung 100 ms
}
display_set_cursor(0, 1);
print_temp(avg >> 6);
}
while(1); // Endlosschleife
}
开发者ID:TheAomx,项目名称:UP-Praktikas,代码行数:33,代码来源:main.c
示例4: main
/* main */
int main(void)
{
/* initialise kernel */
si_kernel_init();
/* initialise UI channel */
si_ui_init();
/* initialise display */
display_init();
/* initialise variables */
clock_init();
/* create tasks */
si_task_create(clock_task, &Clock_Stack[STACK_SIZE-1], 20);
si_task_create(alarm_task, &Alarm_Stack[STACK_SIZE-1],17);
si_task_create(set_task, &Set_Stack[STACK_SIZE-1], 15);
/* start the kernel */
si_kernel_start();
/* will never be here! */
return 0;
}
开发者ID:joka90,项目名称:RealTime-Labs,代码行数:30,代码来源:alarm.c
示例5: main
int main(int argc, char *argv[])
{
printf("Initializing game\n");
clock_t start, end;
int remaining_time;
display_init();
gamepad_init();
grid_init(grid);
players_init(grid, players);
display_fill_screen(0);
g_running = 1;
while(g_running) {
start = clock();
update_pos(grid, players);
end = clock();
remaining_time = TIME_PER_LOOP - (((end - start)/CLOCKS_PER_SEC)*1000);
if(remaining_time > 0) {
usleep(remaining_time*1000);
}
continue;
}
exit(EXIT_SUCCESS);
}
开发者ID:tommp,项目名称:SatacaGameConsole,代码行数:31,代码来源:game.c
示例6: main
int main(int argc, char* argv[]) {
glutInit(&argc, argv);
display_init();
comm_initialize();
/* Call backs */
glutDisplayFunc( display);
glutReshapeFunc( reshape);
glutKeyboardFunc( keyboard);
glutIdleFunc( comm_read);
satellite = add_element("Satellite");
satellite_camera = new Camera();
current_camera = satellite_camera;
planet = add_element("Ball");
for (int ii=0; ii<3 ; ii++) { planet->pos[ii] = 0.0; }
glutMainLoop();
return 0;
}
开发者ID:lonnell,项目名称:trick,代码行数:26,代码来源:Scene.cpp
示例7: main
int main(void)
{
uart_init();
shift_init();
timer_init();
display_init();
keypad_init();
serial_init();
edit_init();
clock_init();
watchdog_init(WDTO_15MS, &oops);
sei(); // enable interrupts
printf("\r\n*** BOOTED ***\r\nSpaceTime, yay!\r\n");
timer_beep(10);
while(1)
{
display_update();
serial_update();
edit_update();
clock_update();
}
}
开发者ID:BruceFletcher,项目名称:SpaceTime,代码行数:29,代码来源:main.c
示例8: ty340_reset
ty340word
ty340_reset(void *dptr)
{
struct type340 *u = UNIT(0);
#ifndef TY340_NODISPLAY
if (!u->initialized) {
display_init(DIS_TYPE340, 1, dptr); /* XXX check return? */
u->initialized = 1;
}
#endif
u->xpos = u->ypos = 0;
u->mode = 0;
u->status = 0;
u->scale = 1;
#if TYPE342
u->shift = 0;
u->width = 6;
u->height = 9;
#endif
#if TYPE347
u->SAVE_FF = 0;
#endif
ty340_rfd(); /* ready for data */
return u->status;
}
开发者ID:agn453,项目名称:simh,代码行数:25,代码来源:type340.c
示例9: ticTacToeDisplay_init
// Inits the tic-tac-toe display, draws the lines that form the board.
void ticTacToeDisplay_init(){
display_init(); // Must init all of the software and underlying hardware for LCD.
display_fillScreen(DISPLAY_BLACK); // Blank the screen.
display_setRotation(true);
buttons_init();
ticTacToeDisplay_drawBoardLines();
/*
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_0, TICTACTOE_DISP_ROW_0);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_1, TICTACTOE_DISP_ROW_0);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_2, TICTACTOE_DISP_ROW_0);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_0, TICTACTOE_DISP_ROW_1);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_1, TICTACTOE_DISP_ROW_1);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_2, TICTACTOE_DISP_ROW_1);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_0, TICTACTOE_DISP_ROW_2);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_1, TICTACTOE_DISP_ROW_2);
ticTacToeDisplay_drawX(TICTACTOE_DISP_COLUMN_2, TICTACTOE_DISP_ROW_2);
*/
/*
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_0, TICTACTOE_DISP_ROW_0);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_0, TICTACTOE_DISP_ROW_1);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_0, TICTACTOE_DISP_ROW_2);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_1, TICTACTOE_DISP_ROW_0);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_1, TICTACTOE_DISP_ROW_1);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_1, TICTACTOE_DISP_ROW_2);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_2, TICTACTOE_DISP_ROW_0);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_2, TICTACTOE_DISP_ROW_1);
ticTacToeDisplay_drawO(TICTACTOE_DISP_COLUMN_2, TICTACTOE_DISP_ROW_2);*/
}
开发者ID:cmthomas000,项目名称:cmthomas000.github.io,代码行数:34,代码来源:ticTacToeDisplay.c
示例10: ng_init
int
ng_init(void *dev, int debug)
{
ng_dptr = dev;
ng_dbit = debug;
return display_init(DIS_NG, ng_scale, ng_dptr);
}
开发者ID:agn453,项目名称:simh,代码行数:7,代码来源:ng.c
示例11: main
int main() {
bool newreadings;
bool buttonschanged;
load_init();
initsystem();
watchdog_init();
initserial();
timer_init();
display_init();
initfan();
adc_init();
buttons_init();
enableInterrupts();
protocol_onbooted();
while (1) {
watchdog_kick();
newreadings = adc_updatereadings();
if (newreadings) {
checkstate();
}
buttonschanged = buttons_check();
if (newreadings || buttonschanged) {
protocol_sendstate();
display_update();
}
protocol_checkcommand();
}
}
开发者ID:fifteenhex,项目名称:openebdmini,代码行数:34,代码来源:openebdmini.c
示例12: main
int main(int ac, char **av)
{
t_args option;
if (ac < 5)
return (usage(av[0]));
signal(SIGINT, &signal_handler);
signal(SIGPIPE, SIG_IGN);
srand(time(NULL) + getpid());
init_args(&option);
if (check_args(ac, av, &option) == false
|| check_all_args(&option) == false)
return (usage(av[0]));
display_init(&option);
g_s.global_time = 0;
g_s.id_egg = 1;
g_s.other_size = 0;
if ((g_s.sock = init_server(option.port)) == -1)
return (display_error("Error : Could not init the server.\n"));
printf("**** Initialization done\n");
init_map(&g_s, option.width, option.height);
init_team(&g_s, option.nb_client, option.team_name);
init_stone(&g_s, option.width * option.height);
g_s.option = &option;
server_loop(&g_s);
xclose(g_s.sock);
return (0);
}
开发者ID:jonquach,项目名称:zappy,代码行数:28,代码来源:main.c
示例13: board_init
void board_init(void)
{
/* Configure the memory interface */
calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS3, 5, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_CS4, 0, CALYPSO_MEM_8bit, 1);
calypso_mem_cfg(CALYPSO_nCS6, 0, CALYPSO_MEM_32bit, 1);
calypso_mem_cfg(CALYPSO_nCS7, 0, CALYPSO_MEM_32bit, 0);
/* Set VTCXO_DIV2 = 1, configure PLL for 104 MHz and give ARM half of that */
calypso_clock_set(2, CALYPSO_PLL13_104_MHZ, ARM_MCLK_DIV_2);
/* Configure the RHEA bridge with some sane default values */
calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0);
/* Initialize board-specific GPIO */
board_io_init();
/* Enable bootrom mapping to route exception vectors to RAM */
calypso_bootrom(1);
calypso_exceptions_install();
/* Initialize interrupt controller */
irq_init();
/* initialize MODEM UART to be used for sercomm*/
uart_init(SERCOMM_UART_NR, 1);
uart_baudrate(SERCOMM_UART_NR, UART_115200);
/* Initialize IRDA UART to be used for old-school console code.
* note: IRDA uart only accessible on C115 and C117 PCB */
uart_init(CONS_UART_NR, 1);
uart_baudrate(CONS_UART_NR, UART_115200);
/* Initialize hardware timers */
hwtimer_init();
/* Initialize DMA controller */
dma_init();
/* Initialize real time clock */
rtc_init();
/* Initialize system timers (uses hwtimer 2) */
timer_init();
/* Initialize LCD driver (uses I2C) and backlight */
display = &st7558_display;
display_init();
bl_mode_pwl(1);
bl_level(50);
/* Initialize keypad driver */
keypad_init(1);
/* Initialize ABB driver (uses SPI) */
twl3025_init();
}
开发者ID:kashif-test,项目名称:VBTS,代码行数:60,代码来源:init.c
示例14: target_init
void target_init(void)
{
uint32_t base_addr;
uint8_t slot;
dprintf(INFO, "target_init()\n");
spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);
target_keystatus();
if (target_use_signed_kernel())
target_crypto_init_params();
/* Display splash screen if enabled */
#if DISPLAY_SPLASH_SCREEN
dprintf(INFO, "Display Init: Start\n");
display_init();
dprintf(INFO, "Display Init: Done\n");
#endif
/* Trying Slot 1*/
slot = 1;
base_addr = mmc_sdc_base[slot - 1];
if (mmc_boot_main(slot, base_addr))
{
/* Trying Slot 2 next */
slot = 2;
base_addr = mmc_sdc_base[slot - 1];
if (mmc_boot_main(slot, base_addr)) {
dprintf(CRITICAL, "mmc init failed!");
ASSERT(0);
}
}
}
开发者ID:joyfish,项目名称:android_bootable_bootloader_lk,代码行数:35,代码来源:init.c
示例15: target_init
void target_init(void)
{
dprintf(INFO, "target_init()\n");
spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);
/* Save PM8941 version info. */
pmic_ver = pm8x41_get_pmic_rev();
target_keystatus();
if (target_use_signed_kernel())
target_crypto_init_params();
/* Display splash screen if enabled */
#if DISPLAY_SPLASH_SCREEN
dprintf(INFO, "Display Init: Start\n");
if (board_hardware_subtype() != HW_PLATFORM_SUBTYPE_CDP_INTERPOSER)
{
display_init();
}
dprintf(INFO, "Display Init: Done\n");
#endif
/*
* Set drive strength & pull ctrl for
* emmc
*/
set_sdc_power_ctrl();
#if MMC_SDHCI_SUPPORT
target_mmc_sdhci_init();
#else
target_mmc_mci_init();
#endif
}
开发者ID:GoldRenard,项目名称:android_bootable_bootloader_lk-shellr,代码行数:35,代码来源:init.c
示例16: main
int main(void) {
/* Set up peripheral bus clock */
/* OSCCONbits.PBDIV = 1; */
OSCCONCLR = 0x100000; /* clear PBDIV bit 1 */
OSCCONSET = 0x080000; /* set PBDIV bit 0 */
/* Set up output pins */
AD1PCFG = 0xFFFF;
ODCE = 0x0;
TRISECLR = 0xFF;
PORTE = 0x0;
/* Output pins for display signals */
PORTF = 0xFFFF;
PORTG = (1 << 9);
ODCF = 0x0;
ODCG = 0x0;
TRISFCLR = 0x70;
TRISGCLR = 0x200;
/* Set up input pins */
TRISDSET = (1 << 8);
TRISFSET = (1 << 1);
/* Set up SPI as master */
SPI2CON = 0;
SPI2BRG = 4;
/* SPI2STAT bit SPIROV = 0; */
SPI2STATCLR = 0x40;
/* SPI2CON bit CKP = 1; */
SPI2CONSET = 0x40;
/* SPI2CON bit MSTEN = 1; */
SPI2CONSET = 0x20;
/* SPI2CON bit ON = 1; */
SPI2CONSET = 0x8000;
int i,c,k;
display_init();
display_update();
for(i = 0;i<3;i++){
display_frommatrix(disco);
for(c = 0;c<1000;c++){
quicksleep(10000);
}
display_frommatrixinv(tetris);
for(k = 0;k<1000;k++){
quicksleep(10000);
}
}
labinit(); /* Do any lab-specific initialization */
while(1)
{
labwork(); /* Do lab-specific things again and again */
}
return 0;
}
开发者ID:AggeFalk,项目名称:DTeK-miniprojekt,代码行数:60,代码来源:mipslabmain.c
示例17: matrix_init
// common/keyboard.c invokes this when the keyboard is initialized.
// This is our entry point.
void matrix_init() {
// To use PORTF disable JTAG with writing JTD bit twice within four cycles.
MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD);
// initialize row and col
unselect_rows();
init_cols();
// initialize matrix state: all keys off
for ( uint8_t i=0; i < MATRIX_ROWS; i++ ) {
matrix[ i ] = (matrix_row_t) 0;
matrix_debouncing[ i ] = (matrix_row_t) 0;
}
// Initialize LED control logic:
led_init();
// Initialize the OLED display:
#ifdef DISPLAY_ENABLE
display_init();
#endif
}
开发者ID:mtl,项目名称:tmk_keyboard,代码行数:27,代码来源:matrix.c
示例18: TicTacToeDisplay_runTest
void TicTacToeDisplay_runTest()
{
display_init();
TicTacToeDisplay_init();
char number = buttons_read();
char read = number & HEX_F;
char s_read = switches_read();
display_clearOldTouchData();
bool go = true;
while(go)
{
s_read = switches_read();
number = buttons_read();
read = number & HEX_F;
utils_msDelay(50);
if(display_isTouched())
{
utils_msDelay(50);
display_clearOldTouchData();
if(display_isTouched())
TicTacToeDisplay_touchScreenComputeBoardRowColumn(&row, &column);
if(s_read == 0x1)
{
TicTacToeDisplay_drawO(row, column);display_clearOldTouchData();
}
else
{
TicTacToeDisplay_drawX(row, column);display_clearOldTouchData();
}
display_clearOldTouchData();
}
if((read & 0x1) == HEX_ONE)
{
TicTacToeDisplay_init();
}
if((read & 0x2) == 0x02)
{
TicTacToeDisplay_complete();
go = false;
}
display_clearOldTouchData();
}
}
开发者ID:brianlwatson,项目名称:ZYBO,代码行数:60,代码来源:TicTacToeDisplay.c
示例19: main
int main(void) {
//allow everything to settle/boot/etc
//(mainly the mp3 chip takes a while to boot up)
_delay_ms(2000);
servo_init();
keypad_init();
display_init();
thermistor_init();
ssr_init();
init_timers();
mp3_init();
tea_off();
PMIC.CTRL |= PMIC_MEDLVLEN_bm | PMIC_LOLVLEN_bm | PMIC_HILVLEN_bm;
sei();
//another 100 for things to settle
_delay_ms(100);
//welcome
mp3_play(10);
while (1) {
char key;
if ((key = keypad_getc()))
handle_key(key);
}
}
开发者ID:topnotcher,项目名称:teabot,代码行数:30,代码来源:main.c
示例20: display_putc
int display_putc(int chr)
{
struct msg_head msg;
int r;
if(display_queid==0) {
r=display_init();
if(r<0)
return r;
}
msg.size=sizeof(struct msg_head);
msg.service=DISPLAY_SRV_DISPLAY;
msg.command=DISPLAY_CMD_PUTC;
msg.arg=chr;
for(;;) {
r=message_send(display_queid, &msg);
if(r!=ERRNO_OVER)
break;
syscall_wait(10);
}
if(r<0) {
syscall_puts("putc sndcmd=");
long2hex(-r,s);
syscall_puts(s);
syscall_puts("\n");
return r;
}
return 0;
}
开发者ID:koujinogaku,项目名称:helloos,代码行数:31,代码来源:display.c
注:本文中的display_init函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论