diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-03-02 13:55:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-02 13:55:56 -0800 |
commit | 082152ba4b52b3cb5d06c31fd53f0c503622e2e3 (patch) | |
tree | c12ca8be1839db0579642abe5abb23fd0cfabbfc /iceprog/mpsse.h | |
parent | 3a2bfee5cbc0558641668114260d3f644d6b7c83 (diff) | |
parent | 8d9fa0fc778a1194dd527e63245f3002aca9a666 (diff) | |
download | icestorm-082152ba4b52b3cb5d06c31fd53f0c503622e2e3.tar.gz icestorm-082152ba4b52b3cb5d06c31fd53f0c503622e2e3.tar.bz2 icestorm-082152ba4b52b3cb5d06c31fd53f0c503622e2e3.zip |
Merge pull request #196 from esden/iceprog-mpsse-refactor
Iceprog mpsse refactor
Diffstat (limited to 'iceprog/mpsse.h')
-rw-r--r-- | iceprog/mpsse.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/iceprog/mpsse.h b/iceprog/mpsse.h new file mode 100644 index 0000000..961cfa5 --- /dev/null +++ b/iceprog/mpsse.h @@ -0,0 +1,38 @@ +/* + * iceprog -- simple programming tool for FTDI-based Lattice iCE programmers + * + * Copyright (C) 2015 Clifford Wolf <clifford@clifford.at> + * Copyright (C) 2018 Piotr Esden-Tempski <piotr@esden.net> + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef MPSSE_H +#define MPSSE_H + +void mpsse_check_rx(void); +void mpsse_error(int status); +uint8_t mpsse_recv_byte(void); +void mpsse_send_byte(uint8_t data); +void mpsse_send_spi(uint8_t *data, int n); +void mpsse_xfer_spi(uint8_t *data, int n); +uint8_t mpsse_xfer_spi_bits(uint8_t data, int n); +void mpsse_set_gpio(uint8_t gpio, uint8_t direction); +int mpsse_readb_low(void); +int mpsse_readb_high(void); +void mpsse_send_dummy_bytes(uint8_t n); +void mpsse_send_dummy_bit(void); +void mpsse_init(int ifnum, const char *devstr, bool slow_clock); +void mpsse_close(void); + +#endif /* MPSSE_H */
\ No newline at end of file |