summaryrefslogtreecommitdiff
path: root/tools/src/asc.h
blob: 0aac349e04f74568d1a5032e8253d0038a07fc4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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