Fixed #include directives and comments to be used in a more standardized way (that I could find online)

This commit is contained in:
William Miceli
2021-05-31 17:36:08 -04:00
parent ca5c5a5ae9
commit b5fc460e46
11 changed files with 35 additions and 50 deletions

View File

@@ -1,23 +1,5 @@
/*
* Clock Initialization Code MSP430F5438A
* Initialize Clock Source XT1 @ 32768 Hz
* Initialize Clock Source XT2 @ 20MHz
*
* Sunseeker Telemetry 2021
*
* Last modified October 2015 by Scott Haver
* Last modified May 2021 by B. Bazuin
*
* Main CLK : MCLK = XT2 = 20 MHz
* Sub-Main CLK : SMCLK = XT2/2 = 10 MHz
* Aux CLK : ACLK = XT1 = 32.768 kHz
*
*/
#include <msp430x54xa.h>
#include "SunseekerTelemetry2021.h"
#include "clock_init.h"
void clock_init(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer; `WDTPW` is the "WatchDog Timer PassWord", required for all `WDTCTL` operations

View File

@@ -1,6 +1,25 @@
/*
* Clock Initialization Code MSP430F5438A
* Initialize Clock Source XT1 @ 32768 Hz
* Initialize Clock Source XT2 @ 20MHz
*
* Sunseeker Telemetry 2021
*
* Last modified October 2015 by Scott Haver
* Last modified May 2021 by B. Bazuin
*
* Main CLK : MCLK = XT2 = 20 MHz
* Sub-Main CLK : SMCLK = XT2/2 = 10 MHz
* Aux CLK : ACLK = XT1 = 32.768 kHz
*
*/
#ifndef CLOCK_INIT_H_
#define CLOCK_INIT_H_
#include <msp430x54xa.h>
#include "SunseekerTelemetry2021.h"
void Port_Init(void);
void Clock_XT1_Init(void);
void Clock_XT2_Init(void);

View File

@@ -1,4 +1,3 @@
#include "SunseekerTelemetry2021.h"
#include "interrupts.h"
extern volatile unsigned char status_flag;

View File

@@ -1,7 +1,6 @@
#ifndef INTERRUPTS_H_
#define INTERRUPTS_H_
#include "SunseekerTelemetry2021.h"
#endif /* INTERRUPTS_H_ */

View File

@@ -1,14 +1,3 @@
/*
* I/O Initialization
*/
/*
* Initialize I/O port directions and states
* Drive unused pins as outputs to avoid floating inputs and wasting power
*
*/
#include "SunseekerTelemetry2021.h"
#include "io_init.h"
void io_init(void)

View File

@@ -1,10 +1,18 @@
/*
* io_init.h
* I/O Initialization
*/
/*
* Initialize I/O port directions and states
* Drive unused pins as outputs to avoid floating inputs and wasting power
*
*/
#ifndef IO_INIT_H_
#define IO_INIT_H_
#include "SunseekerTelemetry2021.h"
void io_init(void);
#endif /* IO_INIT_H_ */

View File

@@ -1,7 +1,3 @@
/*
* main.c
*/
#include "SunseekerTelemetry2021.h"
#include "clock_init.h"
#include "interrupts.h"

View File

@@ -1,10 +1,3 @@
/*
* Initialize Timer B
* - Provides timer tick timebase at 100 Hz
*/
#include "SunseekerTelemetry2021.h"
#include "timers.h"
void timerB_init(void)

View File

@@ -1,6 +1,12 @@
#ifndef TIMERS_H_
#define TIMERS_H_
#include "SunseekerTelemetry2021.h"
/*
* Initialize Timer B
* - Provides timer tick timebase at 100 Hz
*/
void timerB_init(void);
#endif /* TIMERS_H_ */