EE445M RTOS
Taken at the University of Texas Spring 2015
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
uart.c
Go to the documentation of this file.
1
7
void
%
s_Handler
(
void
) {
8
9
unsigned
short
i;
10
notification
note;
11
hw_metadata
metadata;
12
13
/* TODO: determine which bit to clear: */
14
unsigned
long
look_at_me =
UARTIntStatus
();
15
/* UARTIntClear(%s_BASE, ); */
16
17
metadata.
uart
.
channel
= %s_BASE;
18
19
while
(
UARTCharsAvail
(%s_BASE)) {
20
21
/* Notify every subscribed task of each incoming character
22
* (but schedule them for later so we can return from this ISR
23
* asap). */
24
note.
_char
=
uart_get_char
();
25
26
/* TODO: schedule this thread instead of running it immediately */
27
hw_notify
(
HW_UART
, metadata, note);
28
}
29
}
hw_notify
void hw_notify(HW_TYPE type, hw_metadata metadata, notification note)
Definition:
hardware.c:149
uart_get_char
char uart_get_char()
Read a char from the active uart channel.
Definition:
uart.c:87
UARTCharsAvail
bool UARTCharsAvail(uint32_t ui32Base)
Definition:
uart.c:1087
hw_metadata::uart
hw_uart_metadata uart
Definition:
hardware.h:97
hw_uart_metadata::channel
memory_address_t channel
Definition:
hardware.h:56
UARTIntStatus
uint32_t UARTIntStatus(uint32_t ui32Base, bool bMasked)
Definition:
uart.c:1533
s_Handler
void s_Handler(void)
Definition:
uart.c:7
hw_metadata
Definition:
hardware.h:96
HW_UART
Definition:
hardware.h:47
notification::_char
char _char
Definition:
notify.h:25
notification
Definition:
notify.h:22
bin
lisp
templates
uart.c
Generated on Fri Mar 13 2015 21:18:36 for EE445M RTOS by
1.8.9.1