Пример #1
0
int main(){
	init();
	
	// Send default pulse widths upon startup
	send();
	
	// Turn off when select is pressed
	while(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_1)){
		RIT128x96x4StringDraw("PWM Pulse 0: ", 5, 40, drawLevel);
		RIT128x96x4StringDraw("PWM Pulse 1: ", 5, 49, drawLevel);
		
		RIT128x96x4StringDraw("     ", 83, 40, drawLevel);
		RIT128x96x4NumberDraw(359- 359*(pwm0- MIN_WIDTH_0)/(MAX_WIDTH_0- MIN_WIDTH_0), 95, 40, drawLevel);
		RIT128x96x4StringDraw("     ", 83, 49, drawLevel);
		RIT128x96x4NumberDraw(90- 90*(pwm1- MIN_WIDTH_1)/(MAX_WIDTH_1- MIN_WIDTH_1), 95, 49, drawLevel);
	}
	
	RIT128x96x4DisplayOff();
		
	return 0;
}
Пример #2
0
//------------Output_Off------------
// Turns off the OLED display
// Input: none
// Output: none
void Output_Off(void){        //   to prevent burn-in damage
  RIT128x96x4DisplayOff();    // turn off
  Status = 0;                 // ignore any incoming writes
}