Add a Port poll operation

This commit is contained in:
Drew Galbraith 2023-06-16 23:15:28 -07:00
parent 21b73b5b92
commit 35f24e7c77
6 changed files with 49 additions and 0 deletions

View file

@ -46,6 +46,7 @@
#define Z_PORT_CREATE 0x50
#define Z_PORT_SEND 0x51
#define Z_PORT_RECV 0x52
#define Z_PORT_POLL 0x53
#define Z_IRQ_REGISTER 0x58
@ -99,6 +100,10 @@ void ZThreadExit();
uint8_t* bytes, uint64_t num_caps,
uint64_t* caps, uint64_t* type,
uint64_t* actual_bytes, uint64_t* actual_caps);
[[nodiscard]] z_err_t ZPortPoll(uint64_t port_cap, uint64_t num_bytes,
uint8_t* bytes, uint64_t num_caps,
uint64_t* caps, uint64_t* type,
uint64_t* actual_bytes, uint64_t* actual_caps);
[[nodiscard]] z_err_t ZIrqRegister(uint64_t irq_num, uint64_t* port_cap);
[[nodiscard]] z_err_t ZDebug(const char* message);

View file

@ -10,6 +10,7 @@
#define Z_ERR_BUFF_SIZE 005
#define Z_ERR_NULL 0x6
#define Z_ERR_EXISTS 0x7
#define Z_ERR_EMPTY 0x8
#define Z_ERR_CAP_NOT_FOUND 0x100
#define Z_ERR_CAP_TYPE 0x101