aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ioport.h34
-rw-r--r--include/usart.h5
2 files changed, 19 insertions, 20 deletions
diff --git a/include/ioport.h b/include/ioport.h
index 1022493..95b6205 100644
--- a/include/ioport.h
+++ b/include/ioport.h
@@ -9,36 +9,36 @@
#ifdef CONFIG_IOPORTS
enum ioInResistor {
- IO_PULLUP,
- IO_PULLDOWN
+ IO_PULLUP,
+ IO_PULLDOWN
};
static inline void io_setout(uint8_t group, uint8_t mask) {
- IO_DDR(group) |= mask;
+ IO_DDR(group) |= mask;
}
-static inline void io_hight(uint8_t group, uint8_t mask) {
- IO_PORT(group) |= mask;
+static inline void io_high(uint8_t group, uint8_t mask) {
+ IO_PORT(group) |= mask;
}
static inline void io_low(uint8_t group, uint8_t mask) {
- IO_PORT(group) &= ~mask;
+ IO_PORT(group) &= ~mask;
}
static inline void io_set(uint8_t group, uint8_t mask, int8_t val) {
- if (val)
- io_hight(group, mask);
- else
- io_low(group, mask);
+ if (val)
+ io_high(group, mask);
+ else
+ io_low(group, mask);
}
static inline void io_setin(uint8_t group, uint8_t mask,
enum ioInResistor resistor) {
- IO_DDR(group) &= ~mask;
- if (resistor == IO_PULLUP)
- IO_PORT(group) |= mask;
- else
- IO_PORT(group) &= ~mask;
+ IO_DDR(group) &= ~mask;
+ if (resistor == IO_PULLUP)
+ IO_PORT(group) |= mask;
+ else
+ IO_PORT(group) &= ~mask;
}
static inline int8_t io_get(uint8_t group, uint8_t mask) {
- return (int8_t) IO_PIN(group) & mask;
+ return (int8_t) IO_PIN(group) & mask;
}
#ifdef CONFIG_PCINT
@@ -46,7 +46,7 @@ static inline int8_t io_get(uint8_t group, uint8_t mask) {
#define IO_RISING (1 << 0)
#define IO_FALLING (1 << 1)
void io_change_sethook(uint8_t group, uint8_t mask, uint8_t edge,
- void (*change) (uint8_t group, uint8_t mask));
+ void (*change) (uint8_t group, uint8_t mask));
void io_change_remhook(void (*change) (uint8_t group, uint8_t mask));
void io_change_clearhooks(void);
diff --git a/include/usart.h b/include/usart.h
index 76e423d..bb80885 100644
--- a/include/usart.h
+++ b/include/usart.h
@@ -4,7 +4,6 @@
#include <stdio.h>
#include "mcu/mcu_def.h"
-#include "tasks.h"
#include "utils/buffer.h"
#ifndef _USART_H_
@@ -39,10 +38,10 @@ void usart_send_str(char *str);
uint8_t usart_get(void);
#endif
static inline uint8_t usart_queryerror(void) {
- return UCSR0A & (_BV(FE0) | _BV(DOR0) | _BV(UPE0));
+ return UCSR0A & (_BV(FE0) | _BV(DOR0) | _BV(UPE0));
}
static inline int8_t usart_busy(void) {
- return _usart_busy;
+ return _usart_busy;
}
#ifdef CONFIG_USART_INPUT_BUFFER
uint8_t usart_inbuffered(void);