+void cliFunc_lcdColor( char* args )
+{
+ char* curArgs;
+ char* arg1Ptr;
+ char* arg2Ptr = args;
+
+ // Colors
+ uint16_t rgb[3]; // Red, Green, Blue
+
+ // Parse integers from 3 arguments
+ for ( uint8_t color = 0; color < 3; color++ )
+ {
+ curArgs = arg2Ptr;
+ CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
+
+ // Give up if not enough args given
+ if ( *arg1Ptr == '\0' )
+ return;
+
+ // Convert argument to integer
+ rgb[ color ] = numToInt( arg1Ptr );
+ }
+
+ // Set PWM channels
+ FTM0_C0V = rgb[0];
+ FTM0_C1V = rgb[1];
+ FTM0_C2V = rgb[2];
+}
+
+void cliFunc_lcdDisp( char* args )
+{
+ char* curArgs;
+ char* arg1Ptr;
+ char* arg2Ptr = args;
+
+ // First process page and starting address
+ curArgs = arg2Ptr;
+ CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
+
+ // Stop processing args if no more are found
+ if ( *arg1Ptr == '\0' )
+ return;
+ uint8_t page = numToInt( arg1Ptr );
+
+ curArgs = arg2Ptr;
+ CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
+
+ // Stop processing args if no more are found
+ if ( *arg1Ptr == '\0' )
+ return;
+ uint8_t address = numToInt( arg1Ptr );
+
+ // Set the register page
+ LCD_writeControlReg( 0xB0 | ( 0x0F & page ) );
+
+ // Set starting address
+ LCD_writeControlReg( 0x10 | ( ( 0xF0 & address ) >> 4 ) );
+ LCD_writeControlReg( 0x00 | ( 0x0F & address ));
+
+ // Process all args
+ for ( ;; )
+ {
+ curArgs = arg2Ptr;
+ CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr );
+
+ // Stop processing args if no more are found
+ if ( *arg1Ptr == '\0' )
+ break;
+
+ uint8_t value = numToInt( arg1Ptr );
+
+ // Write buffer to SPI
+ SPI_write( &value, 1 );
+ }
+}
+