forked from ultraembedded/cores
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ftdi_hw.h
26 lines (20 loc) · 778 Bytes
/
ftdi_hw.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
#ifndef _FTDI_HW_H_
#define _FTDI_HW_H_
#include <stdint.h>
//-----------------------------------------------------------------
// Defines:
//-----------------------------------------------------------------
//-----------------------------------------------------------------
// Prototypes:
//-----------------------------------------------------------------
int ftdi_hw_init(int interface);
int ftdi_hw_close(void);
// Memory Access
int ftdi_hw_mem_write(uint32_t addr, uint8_t *data, int length);
int ftdi_hw_mem_read(uint32_t addr, uint8_t *data, int length);
int ftdi_hw_mem_write_word(uint32_t addr, uint32_t data);
int ftdi_hw_mem_read_word(uint32_t addr, uint32_t *data);
// GPIO
int ftdi_hw_gpio_write(uint8_t value);
int ftdi_hw_gpio_read(uint8_t *value);
#endif