Fixed #include directives and comments to be used in a more standardized way (that I could find online)
This commit is contained in:
@@ -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"
|
#include "clock_init.h"
|
||||||
|
|
||||||
|
|
||||||
void clock_init(void)
|
void clock_init(void)
|
||||||
{
|
{
|
||||||
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer; `WDTPW` is the "WatchDog Timer PassWord", required for all `WDTCTL` operations
|
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer; `WDTPW` is the "WatchDog Timer PassWord", required for all `WDTCTL` operations
|
||||||
|
|||||||
@@ -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_
|
#ifndef CLOCK_INIT_H_
|
||||||
#define CLOCK_INIT_H_
|
#define CLOCK_INIT_H_
|
||||||
|
|
||||||
|
#include <msp430x54xa.h>
|
||||||
|
#include "SunseekerTelemetry2021.h"
|
||||||
|
|
||||||
void Port_Init(void);
|
void Port_Init(void);
|
||||||
void Clock_XT1_Init(void);
|
void Clock_XT1_Init(void);
|
||||||
void Clock_XT2_Init(void);
|
void Clock_XT2_Init(void);
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#include "SunseekerTelemetry2021.h"
|
|
||||||
#include "interrupts.h"
|
#include "interrupts.h"
|
||||||
|
|
||||||
extern volatile unsigned char status_flag;
|
extern volatile unsigned char status_flag;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#ifndef INTERRUPTS_H_
|
#ifndef INTERRUPTS_H_
|
||||||
#define INTERRUPTS_H_
|
#define INTERRUPTS_H_
|
||||||
|
|
||||||
|
#include "SunseekerTelemetry2021.h"
|
||||||
|
|
||||||
|
|
||||||
#endif /* INTERRUPTS_H_ */
|
#endif /* INTERRUPTS_H_ */
|
||||||
|
|||||||
@@ -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"
|
#include "io_init.h"
|
||||||
|
|
||||||
void io_init(void)
|
void io_init(void)
|
||||||
|
|||||||
@@ -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_
|
#ifndef IO_INIT_H_
|
||||||
#define IO_INIT_H_
|
#define IO_INIT_H_
|
||||||
|
|
||||||
|
#include "SunseekerTelemetry2021.h"
|
||||||
|
|
||||||
void io_init(void);
|
void io_init(void);
|
||||||
|
|
||||||
#endif /* IO_INIT_H_ */
|
#endif /* IO_INIT_H_ */
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
* main.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "SunseekerTelemetry2021.h"
|
#include "SunseekerTelemetry2021.h"
|
||||||
#include "clock_init.h"
|
#include "clock_init.h"
|
||||||
#include "interrupts.h"
|
#include "interrupts.h"
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Initialize Timer B
|
|
||||||
* - Provides timer tick timebase at 100 Hz
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "SunseekerTelemetry2021.h"
|
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
|
|
||||||
void timerB_init(void)
|
void timerB_init(void)
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
#ifndef TIMERS_H_
|
#ifndef TIMERS_H_
|
||||||
#define TIMERS_H_
|
#define TIMERS_H_
|
||||||
|
|
||||||
|
#include "SunseekerTelemetry2021.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize Timer B
|
||||||
|
* - Provides timer tick timebase at 100 Hz
|
||||||
|
*/
|
||||||
void timerB_init(void);
|
void timerB_init(void);
|
||||||
|
|
||||||
#endif /* TIMERS_H_ */
|
#endif /* TIMERS_H_ */
|
||||||
|
|||||||
@@ -15,13 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
#include <msp430x54xa.h>
|
#include <msp430x54xa.h>
|
||||||
|
|
||||||
|
|
||||||
void Port_Init(void);
|
void Port_Init(void);
|
||||||
void Clock_XT1_Init(void);
|
void Clock_XT1_Init(void);
|
||||||
void Clock_XT2_Init(void);
|
void Clock_XT2_Init(void);
|
||||||
void SetVCoreUp(unsigned int level);
|
void SetVCoreUp(unsigned int level);
|
||||||
|
|
||||||
|
|
||||||
void clock_init(void)
|
void clock_init(void)
|
||||||
{
|
{
|
||||||
WDTCTL = WDTPW + WDTHOLD; //Stop watchdog timer
|
WDTCTL = WDTPW + WDTHOLD; //Stop watchdog timer
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
* main.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "SunseekerTelemetry2021.h"
|
#include "SunseekerTelemetry2021.h"
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user