Minor coding style and consistency fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "bus/usart.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static void Puts(const char *str)
|
||||
|
||||
10
src/common/types.h
Normal file
10
src/common/types.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef MAD_CORE_COMMON_TYPES_H
|
||||
#define MAD_CORE_COMMON_TYPES_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef uint8_t byte;
|
||||
typedef uint16_t word;
|
||||
|
||||
#endif // MAD_CORE_COMMON_TYPES_H
|
||||
@@ -43,7 +43,7 @@ void WDT_Enable(void)
|
||||
WDTCR = BIT(WDE) | BIT(WDP2) | BIT(WDP1) | BIT(WDP0);
|
||||
}
|
||||
|
||||
void WDT_SetTimeoutFlag(unsigned char flag)
|
||||
void WDT_SetTimeoutFlag(byte flag)
|
||||
{
|
||||
flag = CLAMP(flag, 7, 0);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#ifndef MAD_CORE_COMMON_WATCHDOG_H
|
||||
#define MAD_CORE_COMMON_WATCHDOG_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "common/types.h"
|
||||
|
||||
void WDT_Enable(void);
|
||||
void WDT_SetTimeoutFlag(unsigned char flag);
|
||||
bool WDT_HasTriggered(void);
|
||||
void WDT_Disable(void);
|
||||
void WDT_Reset(void);
|
||||
void WDT_Enable(void);
|
||||
void WDT_SetTimeoutFlag(byte flag);
|
||||
bool WDT_HasTriggered(void);
|
||||
void WDT_Disable(void);
|
||||
void WDT_Reset(void);
|
||||
|
||||
#endif // MAD_CORE_COMMON_WATCHDOG_H
|
||||
|
||||
Reference in New Issue
Block a user