MSPM0_ValvanoWare
1.0
ECE445L starter code
inc
CLI.h
1
// -------------------------------------------------
2
// CLI.h
3
//
4
// This UART port is for the Command Line Interface to
5
// Motor controller.
6
//
7
// Modified by: Mark McDermott, Jonathan Valvano
8
// Date: July 13, 2026
9
//
10
//-------------------------------------------------
11
//
12
// PA10 is UART0 Tx
13
// PA11 is UART0 Rx
14
15
16
/*****Note to students, feel free to change any or all of this ******/
17
18
//------------------- CLI_Init -------------------
19
// Configure UART0 for serial full duplex operation
20
// Inputs: none
21
// Outputs: none
22
void
CLI_Init(
void
);
23
24
// Outputs status to UART0
25
void
CLI_SystemStatus(
void
);
26
27
// ----------------- CLI_Process ----------------------------
28
// This routine is called periodically. It is a command line interface
29
// to enter values to control the Motor
30
// processed one character at a time, does not spin
31
// There are 6 states that this routine can be in:
32
// cmd_state == 0 -> RESET
33
// cmd_state == 1 -> Enter new_speed
34
// cmd_state == 2 -> Enter Kp1
35
// cmd_state == 3 -> Enter Kp2
36
// cmd_state == 4 -> Enter Ki1
37
// cmd_state == 5 -> Enter Ki1
38
void
CLI_Process(
void
);
Generated by
1.9.1