aboutsummaryrefslogtreecommitdiffstats
path: root/boards/base/RaspberryPi/FreeRTOS
diff options
context:
space:
mode:
Diffstat (limited to 'boards/base/RaspberryPi/FreeRTOS')
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/mmio.h10
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/uart.c8
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/uart.h4
3 files changed, 11 insertions, 11 deletions
diff --git a/boards/base/RaspberryPi/FreeRTOS/mmio.h b/boards/base/RaspberryPi/FreeRTOS/mmio.h
index 1a7fb5c2..8bf3a363 100644
--- a/boards/base/RaspberryPi/FreeRTOS/mmio.h
+++ b/boards/base/RaspberryPi/FreeRTOS/mmio.h
@@ -6,16 +6,16 @@
#include <stdint.h>
// write to MMIO register
-static GFXINLINE void mmio_write(uint32_t reg, uint32_t data) {
- uint32_t *ptr = (uint32_t*)reg;
+static GFXINLINE void mmio_write(gU32 reg, gU32 data) {
+ gU32 *ptr = (gU32*)reg;
asm volatile("str %[data], [%[reg]]"
: : [reg]"r"(ptr), [data]"r"(data));
}
// read from MMIO register
-static GFXINLINE uint32_t mmio_read(uint32_t reg) {
- uint32_t *ptr = (uint32_t*)reg;
- uint32_t data;
+static GFXINLINE gU32 mmio_read(gU32 reg) {
+ gU32 *ptr = (gU32*)reg;
+ gU32 data;
asm volatile("ldr %[data], [%[reg]]"
: [data]"=r"(data) : [reg]"r"(ptr));
return data;
diff --git a/boards/base/RaspberryPi/FreeRTOS/uart.c b/boards/base/RaspberryPi/FreeRTOS/uart.c
index 92f837e7..ef040fca 100644
--- a/boards/base/RaspberryPi/FreeRTOS/uart.c
+++ b/boards/base/RaspberryPi/FreeRTOS/uart.c
@@ -46,12 +46,12 @@ enum {
/*
* delay function
- * int32_t delay: number of cycles to delay
+ * gI32 delay: number of cycles to delay
*
* This just loops <delay> times in a way that the compiler
* wont optimize away.
*/
-static void delay(int32_t count) {
+static void delay(gI32 count) {
asm volatile("__delay_%=: subs %[count], %[count], #1; bne __delay_%=\n"
: : [count]"r"(count) : "cc");
}
@@ -102,9 +102,9 @@ void uart_init() {
/*
* Transmit a byte via UART0.
- * uint8_t Byte: byte to send.
+ * gU8 Byte: byte to send.
*/
-void uart_putc(uint8_t byte) {
+void uart_putc(gU8 byte) {
// wait for UART to become ready to transmit
while (1) {
if (!(mmio_read(UART0_FR) & (1 << 5))) {
diff --git a/boards/base/RaspberryPi/FreeRTOS/uart.h b/boards/base/RaspberryPi/FreeRTOS/uart.h
index fe7f64aa..ca9f377e 100644
--- a/boards/base/RaspberryPi/FreeRTOS/uart.h
+++ b/boards/base/RaspberryPi/FreeRTOS/uart.h
@@ -12,9 +12,9 @@ void uart_init();
/*
* Transmit a byte via UART0.
- * uint8_t Byte: byte to send.
+ * gU8 Byte: byte to send.
*/
-void uart_putc(uint8_t byte);
+void uart_putc(gU8 byte);
/*
* print a string to the UART one character at a time