dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fpga_drv.h
Go to the documentation of this file.
1 
14 /*
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 3 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful, but
21  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  * for more details.
24  *
25  * You should have received a copy of the GNU General Public License along
26  * with this program; if not, see <http://www.gnu.org/licenses/>
27  *
28  * Additional note on redistribution: The copyright and license notices above
29  * must be maintained in each individual source file that is a derivative work
30  * of this source file; otherwise redistribution is prohibited.
31  */
32 
33 #ifndef PIOS_RE1FPGA_H
34 #define PIOS_RE1FPGA_H
35 
36 #include <pios_video.h>
37 
39  struct stm32_gpio mco_pin; /* pin used for clock output to FPGA */
40  struct stm32_gpio rst_pin; /* pin used to reset FPGA */
41  struct stm32_gpio cdone_pin; /* configuration done pin */
42  struct stm32_gpio cresetb_pin; /* configuration reset pin */
43 };
44 
48 };
49 
54 };
55 
59 };
60 
61 
62 int32_t PIOS_RE1FPGA_Init(pios_spi_t spi_id, uint32_t slave_num, const struct pios_re1fpga_cfg *cfg, bool load_config);
64 int32_t PIOS_RE1FPGA_SerialRxInvert(bool invert);
65 int32_t PIOS_RE1FPGA_MPTxPinMode(bool bidrectional, bool invert);
66 int32_t PIOS_RE1FPGA_MPTxPinPullUpDown(bool enable, bool pullup);
68 int32_t PIOS_RE1FPGA_Buzzer(bool enable);
70 void PIOS_RE1FPGA_SetBwLevels(uint8_t black, uint8_t white);
71 int32_t PIOS_RE1FPGA_SetSyncThreshold(uint8_t threshold);
72 void PIOS_RE1FPGA_SetXOffset(int8_t x_offset);
73 void PIOS_RE1FPGA_SetXScale(uint8_t x_scale);
74 void PIOS_RE1FPGA_Set3DConfig(enum pios_video_3d_mode mode, uint8_t x_shift_right);
76 int32_t PIOS_RE1FPGA_SetIRData(const uint8_t * ir_data, uint8_t n_bytes);
77 
78 #endif /* PIOS_RE1FPGA_H */
79 
void PIOS_RE1FPGA_SetBwLevels(uint8_t black, uint8_t white)
int32_t PIOS_RE1FPGA_Init(pios_spi_t spi_id, uint32_t slave_num, const struct pios_re1fpga_cfg *cfg, bool load_config)
int32_t PIOS_RE1FPGA_SetBuzzerType(enum pios_re1fpga_buzzer_types type)
pios_re1fpga_buzzer_types
Definition: fpga_drv.h:56
OSD gen module, handles OSD draw. Parts from CL-OSD and SUPEROSD projects.
struct stm32_gpio rst_pin
Definition: fpga_drv.h:40
pios_video_3d_mode
Definition: pios_video.h:45
struct stm32_gpio cresetb_pin
Definition: fpga_drv.h:42
int32_t PIOS_RE1FPGA_Buzzer(bool enable)
void PIOS_RE1FPGA_SetXOffset(int8_t x_offset)
static struct flyingpicmd_cfg_fa cfg
Definition: main.c:49
void PIOS_RE1FPGA_SetXScale(uint8_t x_scale)
int32_t PIOS_RE1FPGA_MPTxPinMode(bool bidrectional, bool invert)
int32_t PIOS_RE1FPGA_SetSyncThreshold(uint8_t threshold)
int32_t PIOS_RE1FPGA_SetNotificationLedColor(enum pios_re1fpga_led_colors led_colors)
uint8_t PIOS_RE1FPGA_GetHWRevision()
enum channel_mode mode
Definition: pios_servo.c:58
int32_t PIOS_RE1FPGA_SetIRProtocol(enum pios_re1fpga_ir_protocols ir_protocol)
int32_t PIOS_RE1FPGA_MPTxPinPullUpDown(bool enable, bool pullup)
uint8_t type
pios_re1fpga_ir_protocols
Definition: fpga_drv.h:50
pios_re1fpga_led_colors
Definition: fpga_drv.h:45
int32_t PIOS_RE1FPGA_SerialRxInvert(bool invert)
void PIOS_RE1FPGA_Set3DConfig(enum pios_video_3d_mode mode, uint8_t x_shift_right)
struct stm32_gpio cdone_pin
Definition: fpga_drv.h:41
int32_t PIOS_RE1FPGA_SetIRData(const uint8_t *ir_data, uint8_t n_bytes)
struct stm32_gpio mco_pin
Definition: fpga_drv.h:39