Ran clang-format on project files.

This commit is contained in:
Jake Goodwin 2024-08-04 11:29:00 -07:00
parent 1f652b7c37
commit 427a5d1786
7 changed files with 62 additions and 80 deletions

View File

@ -13,7 +13,6 @@ void RegEdit_SetRegister(void *reg)
*reg_ptr = 0xFF; *reg_ptr = 0xFF;
} }
void RegEdit_ClearRegister(void *reg) void RegEdit_ClearRegister(void *reg)
{ {
uint8_t *reg_ptr = (uint8_t *)reg; uint8_t *reg_ptr = (uint8_t *)reg;
@ -46,7 +45,6 @@ void RegEdit_OR_Num(void *reg, uint8_t num)
void RegEdit_AND_Num(void *reg, uint8_t num) void RegEdit_AND_Num(void *reg, uint8_t num)
{ {
uint8_t *reg_ptr = (uint8_t *)reg; uint8_t *reg_ptr = (uint8_t *)reg;
*reg_ptr &= num; *reg_ptr &= num;
} }
@ -57,7 +55,6 @@ void RegEdit_SetNum(void *reg, uint8_t num)
*reg_ptr = num; *reg_ptr = num;
} }
uint8_t RegEdit_ReadReg(void *reg) uint8_t RegEdit_ReadReg(void *reg)
{ {
uint8_t *reg_ptr = (uint8_t *)reg; uint8_t *reg_ptr = (uint8_t *)reg;

View File

@ -10,9 +10,8 @@
#ifndef REGEDIT_H #ifndef REGEDIT_H
#define REGEDIT_H #define REGEDIT_H
#include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h>
/** /**
* *

View File

@ -14,25 +14,20 @@
// This can prevent issues with utils/delay.h library with the gcc toolchain // This can prevent issues with utils/delay.h library with the gcc toolchain
#define __DELAY_BACKWARD_COMPATIBLE__ #define __DELAY_BACKWARD_COMPATIBLE__
#include "config.h"
#include "RegEdit.h" #include "RegEdit.h"
#include "config.h"
#include "timer.h" #include "timer.h"
#include <avr/cpufunc.h> /* Required header file */ #include <avr/cpufunc.h> /* Required header file */
#include <avr/io.h> #include <avr/io.h>
#include <util/delay.h> #include <util/delay.h>
// Set the function pointer for the delay func // Set the function pointer for the delay func
void (*Delay_MicroSeconds)(double us) = _delay_us; void (*Delay_MicroSeconds)(double us) = _delay_us;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
while (true)
{
while(true){
; // Do nothing until new Power cycle/reset occurs ; // Do nothing until new Power cycle/reset occurs
} }
} }

View File

@ -7,7 +7,6 @@
* @file module_name.h * @file module_name.h
*/ */
#include "timer.h" #include "timer.h"
// dumb test function // dumb test function

View File

@ -10,13 +10,10 @@
#ifndef TIMER #ifndef TIMER
#define TIMER #define TIMER
/** /**
* A function that adds two to a number * A function that adds two to a number
* @param a The first argument * @param a The first argument
*/ */
int add_two(int a); int add_two(int a);
#endif // TIMER #endif // TIMER

View File

@ -45,15 +45,14 @@ void USART0_init(void)
void USART0_sendChar(char c) void USART0_sendChar(char c)
{ {
while (!(USART0.STATUS & USART_DREIF_bm)){ while (!(USART0.STATUS & USART_DREIF_bm))
{
; ;
} }
USART0.TXDATAL = c; USART0.TXDATAL = c;
USART0.TXDATAH = c; USART0.TXDATAH = c;
} }
void USART0_sendString(char *str) void USART0_sendString(char *str)
{ {
for (size_t i = 0; i < strlen(str); i++) for (size_t i = 0; i < strlen(str); i++)
@ -61,4 +60,3 @@ void USART0_sendString(char *str)
USART0_sendChar(str[i]); USART0_sendChar(str[i]);
} }
} }

View File

@ -10,7 +10,6 @@
#ifndef USART_H #ifndef USART_H
#define USART_H #define USART_H
/** /**
* @brief Initializes the USART0 peripheral. * @brief Initializes the USART0 peripheral.
*/ */
@ -28,6 +27,4 @@ void USART0_sendChar(char c);
*/ */
void USART0_sendString(char *str); void USART0_sendString(char *str);
#endif // USART_H #endif // USART_H