start mod06 ex00

This commit is contained in:
hugogogo
2025-03-15 18:56:04 +01:00
parent bd23d89706
commit 4f18cd2c56
6 changed files with 20 additions and 138 deletions

View File

@@ -39,12 +39,17 @@ void uart_printstr_endl(const char* str) {
uart_printstr("\r\n");
}
void uart_printstr_itoa_base(uint64_t value) {
char buffer[17] = {0};
int_to_string((uint16_t)value, buffer);
void uart_printstr_itoa_base(uint64_t value, uint8_t base) {
char buffer[100] = {0};
int_to_string_base((uint16_t)value, buffer, base);
uart_printstr(buffer);
}
void uart_printstr_itoa_base_endl(uint64_t value, uint8_t base) {
uart_printstr_itoa_base(value, base);
uart_printstr("\r\n");
}
// ISR(USART_RX_vect) { // Table 12-6 : we select the code for USART Receive
// char received_char = UDR0; // read received character
// if (received_char == '\b' || received_char == 127) { // if backspace is received