Write to a data register with a0 bit high
| 221 | |
| 222 | // Write to a data register with a0 bit high |
| 223 | void LCD_writeDataReg( uint8_t byte ) |
| 224 | { |
| 225 | #if defined(_kinetis_) |
| 226 | // Wait for TxFIFO to be empt |
| 227 | while ( SPI0_TxFIFO_CNT != 0 ); |
| 228 | |
| 229 | // Set A0 high to enter display register mode |
| 230 | GPIOC_PSOR |= (1<<7); |
| 231 | |
| 232 | // Write byte to SPI FIFO |
| 233 | SPI_write( &byte, 1 ); |
| 234 | |
| 235 | // Wait for TxFIFO to be empty |
| 236 | while ( SPI0_TxFIFO_CNT != 0 ); |
| 237 | |
| 238 | // Make sure data has transferred |
| 239 | delay_us(10); // XXX Adjust if SPI speed changes |
| 240 | #elif defined(_sam_) |
| 241 | // Set A0 high to enter display register mode |
| 242 | PIOC->PIO_SODR= (1<<7); |
| 243 | |
| 244 | // Write byte to SPI FIFO |
| 245 | SPI_write( &byte, 1 ); |
| 246 | |
| 247 | // Make sure data has transferred |
| 248 | delay_us(10); // XXX Adjust if SPI speed changes |
| 249 | #endif |
| 250 | |
| 251 | } |
| 252 | |
| 253 | // Write to display register |
| 254 | // Pages 0-7 normal display |
no test coverage detected
searching dependent graphs…