12345678910111213141516171819 |
- #include "mcc_generated_files/mcc.h"
- #include <string.h>
- void serial_print_bytes(const char *data, int len) {
- for (int i=0; i<len; i++) {
- EUSART1_Write(data[i]);
- }
- }
- void serial_print(const char *data) {
- size_t len = strlen(data);
- serial_print_bytes(data, len);
- }
- void serial_println(const char *data) {
- serial_print(data);
- serial_print_bytes("\r\n", 2);
- }
|