-
Notifications
You must be signed in to change notification settings - Fork 16
/
mc6850.h
36 lines (25 loc) · 1.15 KB
/
mc6850.h
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
31
32
33
34
35
36
#ifndef BEEBJIT_MC6850_H
#define BEEBJIT_MC6850_H
#include <stdint.h>
struct mc6850_struct;
struct bbc_options;
struct state_6502;
struct tape_struct;
struct mc6850_struct* mc6850_create(struct state_6502* p_state_6502,
struct bbc_options* p_options);
void mc6850_destroy(struct mc6850_struct* p_serial);
void mc6850_set_transmit_ready_callback(
struct mc6850_struct* p_serial,
void (*p_transmit_ready_callback)(void* p),
void* p_transmit_ready_object);
void mc6850_power_on_reset(struct mc6850_struct* p_serial);
uint8_t mc6850_read(struct mc6850_struct* p_serial, uint8_t reg);
void mc6850_write(struct mc6850_struct* p_serial, uint8_t reg, uint8_t val);
void mc6850_set_DCD(struct mc6850_struct* p_serial, int is_DCD);
void mc6850_set_CTS(struct mc6850_struct* p_serial, int is_CTS);
int mc6850_get_RTS(struct mc6850_struct* p_serial);
int mc6850_is_transmit_ready(struct mc6850_struct* p_serial);
void mc6850_receive_bit(struct mc6850_struct* p_serial, int bit);
int mc6850_receive(struct mc6850_struct* p_serial, uint8_t byte);
uint8_t mc6850_transmit(struct mc6850_struct* p_serial);
#endif /* BEEBJIT_MC6850_H */