docs: Modified Comments
This commit is contained in:
parent
b90fe403f5
commit
7bdb0dbf1a
|
@ -1,8 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Lab 2
|
* Lab 2
|
||||||
* This is configured with GPIO15 as a pseudo button with a pull up resistor
|
* This is configured with GPIO15 as a pseudo button with a pull up resistor
|
||||||
* Since the button is active low, the program will send '1' when the button is not pressed (high)
|
* Since the button is active low, the program will send '1' when the button
|
||||||
* and send 'A' to 'Z' when the button is pressed (low)
|
* is not pressed (high) and send 'A' to 'Z' when the button is pressed (low)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -31,7 +31,9 @@ static void uart_transmit(u_char *uart_input) {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uart_putc(UART_ID, *uart_input);
|
uart_putc(UART_ID, *uart_input);
|
||||||
*uart_input = (*uart_input - 'A' + 1) % 26 + 'A'; // Next character and wrap around back to A
|
|
||||||
|
// Increment character and wrap around if necessary
|
||||||
|
*uart_input = (*uart_input - 'A' + 1) % 26 + 'A';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -89,7 +91,6 @@ static void pin_init() {
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Initialize stdio and pins first
|
// Initialize stdio and pins first
|
||||||
|
|
||||||
stdio_init_all();
|
stdio_init_all();
|
||||||
pin_init();
|
pin_init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue