-
Notifications
You must be signed in to change notification settings - Fork 0
/
console.h
46 lines (39 loc) · 926 Bytes
/
console.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @file ece353.h
* @author your name ([email protected])
* @brief
* @version 0.1
* @date 2023-08-15
*
* @copyright Copyright (c) 2023
*
*/
#ifndef __CONSOLE_H__
#define __CONSOLE_H__
#include "cy_pdl.h"
#include "cyhal.h"
#include "cybsp.h"
#include "cy_retarget_io.h"
#include <ctype.h>
#include <stdio.h>
/* UART Pins*/
#define PIN_UART_DBG_RX P5_0
#define PIN_UART_DBG_TX P5_1
/**
* @brief
* Initialize the UART interface used to print messages to the serial monitor
*/
void console_init(void);
/**
* @brief
* Returns a string entered from the console
* @param msg
* A pointer to the character array where the string will be written to
* @return true
* A string was entered at the console. The string ends when a \n or \r is
* received
* @return false
* A string has not been received.
*/
bool console_rx_string(uint8_t *msg);
#endif