summaryrefslogtreecommitdiffstats
path: root/app/prototypes.h
blob: c73b3de8a13c7eb009efb9f4b308c4f31b16fee7 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* dfu.c */
extern const struct usb_dfu_descriptor dfu_function;
extern const struct usb_interface_descriptor dfu_iface;
extern int dfu_control_request(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len, void (**complete)(usbd_device *usbd_dev, struct usb_setup_data *req));
/* mouse.c */
extern const struct usb_endpoint_descriptor mouse_endpoint;
extern const struct usb_interface_descriptor mouse_iface;
extern void mouse_get_descriptor(uint8_t **buf, uint16_t *len);
extern void mouse_test(void);
/* keyboard.c */
extern const struct usb_endpoint_descriptor keyboard_endpoint;
extern const struct usb_interface_descriptor keyboard_iface;
extern void keyboard_get_descriptor(uint8_t **buf, uint16_t *len);
extern void keyboard_test(void);
/* main.c */
extern int main(void);
/* usb.c */
extern const struct usb_device_descriptor dev;
extern const struct usb_interface ifaces[];
extern const struct usb_config_descriptor config;
extern usbd_device *usbd_dev;
extern int usb_time_since_sof;
extern int usb_is_suspended;
extern int usb_wakeup_host(void);
extern void usb_set_config(usbd_device *usbd_dev, uint16_t wValue);
extern void usb_tick(void);
extern void usb_init(void);
extern void usb_run(void);
/* tablet.c */
extern const struct usb_endpoint_descriptor tablet_endpoint;
extern const struct usb_interface_descriptor tablet_iface;
extern void tablet_get_descriptor(uint8_t **buf, uint16_t *len);
extern void tablet_test(void);
/* usart.c */
extern ring_t rx1_ring;
extern ring_t tx1_ring;
extern ring_t rx2_ring;
extern ring_t tx2_ring;
extern ring_t tx3_ring;
extern void usart1_isr(void);
extern void usart2_isr(void);
extern void usart3_isr(void);
extern int _write(int file, char *ptr, int len);
extern void usart2_queue(uint8_t d);
extern void usart3_queue(uint8_t d);
extern void usart_init(void);
/* kvm.c */
extern void kvm_dispatch(void);
extern void kvm_recv(uint8_t d);
/* ring.c */
extern void ring_init(ring_t *r, uint8_t *buf, size_t len);
extern int ring_write_byte(ring_t *r, uint8_t c);
extern int ring_read_byte(ring_t *r, uint8_t *c);
extern int ring_write(ring_t *r, uint8_t *buf, size_t len);
/* led.c */
extern void led_init(void);
extern void led_set(uint32_t v);
extern void led_tick(void);
/* consumer.c */
extern const struct usb_endpoint_descriptor consumer_endpoint;
extern const struct usb_interface_descriptor consumer_iface;
extern void consumer_get_descriptor(uint8_t **buf, uint16_t *len);
/* ticker.c */
extern volatile uint32_t ticks;
extern void delay_us(uint32_t d);
extern void sys_tick_handler(void);
extern void delay_ms(uint32_t d);
extern int timed_out(uint32_t then, unsigned int ms);
extern void ticker_init(void);