BlinkyLED-Basic should be completed; it has an intentionally extremely simple program loop

This commit is contained in:
William Miceli
2021-05-15 21:16:24 -04:00
parent 27bda00eda
commit 3f7a034389
16 changed files with 8960 additions and 9201 deletions

View File

@@ -21,8 +21,6 @@
void clock_init(void);
void timerB_init(void);
void io_init(void);
static inline void delay(void)
{
@@ -51,31 +49,6 @@ static inline void delay(void)
#define TRUE 1
#define FALSE 0
#ifndef MODEM_BR1
#define MODEM_BR1 9600
#define MODEM_UCBRS1 0x04 // 2*ROUND(SMCLK_RATE/MODEM_BR-INT(SMCLK_RATE/MODEM_BR))*8
#endif
#ifndef MODEM_BR2
#define MODEM_BR2 115200
#define MODEM_UCBRS2 0x0A // 2*ROUND(SMCLK_RATE/MODEM_BR-INT(SMCLK_RATE/MODEM_BR))*8
#endif
#ifndef USB_BR
#define USB_BR 9600
#define USB_UCBRS 0x04 // 2*ROUND(SMCLK_RATE/UART_BR-INT(SMCLK_RATE/UART_BR))*8
#endif
#ifndef UART_BR
#define UART_BR 19200
#define UART_UCBRS 0x0D // 2*ROUND(SMCLK_RATE/UART_BR-INT(SMCLK_RATE/UART_BR))*8
#endif
#include "RTC.h"
#include "CAN.h"
#include "RS232.h"
/******************** Pin Definitions *************************/
// PORT 1
@@ -373,3 +346,5 @@ static char *name_lookup[NAME_LOOKUP_ROWS] = {
// "MC1TP3", //MC_CAN_BASE1 + MC_TEMP3
// "MC2FAN", //MC_CAN_BASE2 + MC_FAN
// "MC2TP3", //MC_CAN_BASE2 + MCSUNSEEKERTELEMETRY2021_H_* SUNSEEKERTELEMETRY2021_H_ */
#endif /* SUNSEEKERTELEMETRY2021_H_ */

View File

@@ -4,31 +4,21 @@
#include "SunseekerTelemetry2021.h"
// General Variables
// CAN Communication Variables
volatile unsigned char cancomm_flag = FALSE; //used for CAN transmission timing
volatile unsigned char send_can = FALSE; //used for CAN transmission timing
volatile unsigned char rcv_can = FALSE; //used for CAN transmission timing
volatile unsigned char can_full = FALSE; //used for CAN transmission status
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
_DINT(); //disables interrupts
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
_DINT(); // Disables interrupts
clock_init(); //Configure HF and LF clocks
clock_init(); // Configure HF and LF clocks
delay();
P8DIR
P8DIR = LEDG | LEDR | LEDY0 | LEDY1; // Set all four main LEDs as output
P8OUT |= LEDG; // Turn on permanently the green LED
_EINT(); //enable global interrupts
_EINT(); //enable global interrupts
while(1)
{
P8OUT ^= BIT3; // Toggle P1.0
P8OUT ^= BIT6; // Toggle P1.0
P8OUT ^= LEDY0 | LEDY1; // Toggle both yellow LEDs
delay();
}
}