hollyhock
serial.hpp
Go to the documentation of this file.
1 
6 // This works exactly the same as the calls on the cg50. Read more here:
7 // https://prizm.cemetech.net/index.php?title=Category:Syscalls:Serial
8 // These implementations are similar to:
9 // https://github.com/Jonimoose/libfxcg/blob/master/include/fxcg/serial.h
10 
11 #pragma once
12 #include <stdint.h>
13 
30 extern "C"
31 int Serial_Open(unsigned char *mode);
32 
33 extern "C"
34 int Serial_IsOpen(void);
35 
36 extern "C"
37 int Serial_Close(int mode);
38 
39 extern "C"
40 int Serial_Read(unsigned char *out, int sz, short *count);
41 
42 extern "C"
43 int Serial_ReadSingle(unsigned char *out);
44 
45 extern "C"
46 int Serial_Peek(int idx, unsigned char *out);
47 
48 extern "C"
49 int Serial_PollRX(void);
50 
51 extern "C"
52 int Serial_ClearRX(void);
53 
61 extern "C"
62 int Serial_Write(const unsigned char *buf, int count);
63 
64 extern "C"
65 int Serial_WriteSingle(unsigned char x);
66 
67 extern "C"
68 int Serial_WriteUnbuffered(unsigned char x);
69 
70 extern "C"
71 int Serial_PollTX(void);
72 
73 extern "C"
74 int Serial_ClearTX(void);
75 
76 
int Serial_Write(const unsigned char *buf, int count)
int Serial_Open(unsigned char *mode)