forked from davecrump/longmynd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ftdi_usb.h
42 lines (33 loc) · 1.63 KB
/
ftdi_usb.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
37
38
39
40
41
/* -------------------------------------------------------------------------------------------------- */
/* The LongMynd receiver: ftdi_usb.h */
/* Copyright 2019 Heather Lomond */
/* -------------------------------------------------------------------------------------------------- */
/*
This file is part of longmynd.
Longmynd is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Longmynd is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with longmynd. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FTDI_USB_H
#define FTDI_USB_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
/* Definitions for flow control */
#define USB_TIMEOUT 5000
#define USB_FAST_TIMEOUT 500
uint8_t ftdi_usb_i2c_write( uint8_t *, uint8_t);
uint8_t ftdi_usb_i2c_read( uint8_t **);
uint8_t ftdi_usb_set_mpsse_mode_i2c(void);
uint8_t ftdi_usb_set_mpsse_mode_ts(void);
uint8_t ftdi_usb_ts_read(uint8_t *, uint16_t *, uint32_t);
uint8_t ftdi_usb_init_i2c(uint8_t, uint8_t, uint16_t, uint16_t);
uint8_t ftdi_usb_init_ts(uint8_t, uint8_t, uint16_t, uint16_t);
#endif