m1n1/src/asc.h
Hector Martin 9a2e530fed nvme: Add nvme_ensure_shutdown()
We're not using it in the end because we fixed this in Linux, but I went
through the trouble of writing the function so we might as well leave it
lying around.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-11 17:47:41 +09:00

31 lines
670 B
C

/* 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_cpu_running(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