Add paracli, a parallel port comm utility

This commit is contained in:
2025-09-29 18:00:55 +02:00
parent 83e267fa36
commit 8b434f4434
5 changed files with 251 additions and 1 deletions

19
paracomm.h Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <stdint.h>
typedef void (*miso_cb_t)(const uint8_t* buff, uint8_t size);
/** Must call first **/
void paracomm_init(miso_cb_t miso_cb);
/** Sends a single byte.
* Returns: 0 if no error, non-0 otherwise.
*/
int paracomm_send(uint8_t b);
/** Call after reading a nibble from the port */
void paracomm_feed(uint8_t n);
/** Yields the next byte to send out the port */
uint8_t paracomm_nextbyte();