PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Examples
PropWare_BufferedUART
buffereduarttx.cogcpp
Go to the documentation of this file.
1
26
#include <
PropWare/serial/uart/uarttx.h
>
27
#include "
BufferedUART_Demo.h
"
28
29
using
PropWare::UARTTX
;
30
31
_NATIVE
int
main
() {
32
CharQueue
*buffer = *
reinterpret_cast<
CharQueue
**
>
(
PAR
);
33
34
const
UARTTX
tx;
35
36
while
(1) {
37
while
(buffer->
is_empty
());
38
const
char
c = buffer->
dequeue
();
39
tx.send(
static_cast<
uint16_t
>
(c));
40
}
41
}
BufferedUART_Demo.h
_NATIVE
#define _NATIVE
Can be used in per-function declarations to tell compiler that function will use cog "call/ret" calli...
Definition:
cog.h:57
PropWare::Queue::is_empty
bool is_empty() const
Determine if any elements exist.
Definition:
queue.h:100
uarttx.h
PropWare::UARTTX
Definition:
uarttx.h:38
main
int main(void)
Definition:
GraphicsTest.c:20
PropWare::Queue::dequeue
virtual T dequeue()
Return and remove the oldest value in the buffer.
Definition:
queue.h:181
PropWare::CharQueue
Provide a communication buffer for character data between cogs.
Definition:
charqueue.h:46
PAR
#define PAR
Parameter register is used for sharing HUB RAM address info with the COG.
Definition:
propeller1.h:149
Generated on Fri May 20 2022 16:48:01 for PropWare by
1.8.17