diff options
Diffstat (limited to 'tools/src/asc.h')
| -rw-r--r-- | tools/src/asc.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/src/asc.h b/tools/src/asc.h new file mode 100644 index 0000000..0aac349 --- /dev/null +++ b/tools/src/asc.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef ASC_H +#define ASC_H + +#include "types.h" + +struct asc_message { + u64 msg0; + u32 msg1; +}; + +typedef struct asc_dev asc_dev_t; + +asc_dev_t *asc_init(const char *path); +void asc_free(asc_dev_t *asc); + +int asc_get_iop_node(asc_dev_t *asc); + +void asc_cpu_start(asc_dev_t *asc); +void asc_cpu_stop(asc_dev_t *asc); + +bool asc_can_recv(asc_dev_t *asc); +bool asc_can_send(asc_dev_t *asc); + +bool asc_recv(asc_dev_t *asc, struct asc_message *msg); +bool asc_recv_timeout(asc_dev_t *asc, struct asc_message *msg, u32 delay_usec); +bool asc_send(asc_dev_t *asc, const struct asc_message *msg); + +#endif |
