|
|
@ -74,7 +74,7 @@ struct serialPortVTable { |
|
|
|
|
|
|
|
void (*setMode)(serialPort_t *instance, portMode_t mode); |
|
|
|
|
|
|
|
void (*writeBuf)(serialPort_t *instance, void *data, int count); |
|
|
|
void (*writeBuf)(serialPort_t *instance, const void *data, int count); |
|
|
|
// Optional functions used to buffer large writes. |
|
|
|
void (*beginWrite)(serialPort_t *instance); |
|
|
|
void (*endWrite)(serialPort_t *instance); |
|
|
@ -83,7 +83,7 @@ struct serialPortVTable { |
|
|
|
void serialWrite(serialPort_t *instance, uint8_t ch); |
|
|
|
uint32_t serialRxBytesWaiting(const serialPort_t *instance); |
|
|
|
uint8_t serialTxBytesFree(const serialPort_t *instance); |
|
|
|
void serialWriteBuf(serialPort_t *instance, uint8_t *data, int count); |
|
|
|
void serialWriteBuf(serialPort_t *instance, const uint8_t *data, int count); |
|
|
|
uint8_t serialRead(serialPort_t *instance); |
|
|
|
void serialSetBaudRate(serialPort_t *instance, uint32_t baudRate); |
|
|
|
void serialSetMode(serialPort_t *instance, portMode_t mode); |
|
|
@ -92,6 +92,6 @@ void serialPrint(serialPort_t *instance, const char *str); |
|
|
|
uint32_t serialGetBaudRate(serialPort_t *instance); |
|
|
|
|
|
|
|
// A shim that adapts the bufWriter API to the serialWriteBuf() API. |
|
|
|
void serialWriteBufShim(void *instance, uint8_t *data, int count); |
|
|
|
void serialWriteBufShim(void *instance, const uint8_t *data, int count); |
|
|
|
void serialBeginWrite(serialPort_t *instance); |
|
|
|
void serialEndWrite(serialPort_t *instance); |