5151#include "gpio_lpc.h"
5252
5353/* GPIO Output PinMux */
54- static struct gpio_t gpio_led [] = {
54+ static struct gpio gpio_led [] = {
5555 GPIO (2 , 1 ),
5656 GPIO (2 , 2 ),
5757 GPIO (2 , 8 ),
@@ -65,134 +65,134 @@ static struct gpio_t gpio_led[] = {
6565
6666// clang-format off
6767#ifndef PRALINE
68- static struct gpio_t gpio_1v8_enable = GPIO (3 , 6 );
68+ static struct gpio gpio_1v8_enable = GPIO (3 , 6 );
6969#else
70- static struct gpio_t gpio_1v2_enable = GPIO (4 , 7 );
71- static struct gpio_t gpio_3v3aux_enable_n = GPIO (5 , 15 );
70+ static struct gpio gpio_1v2_enable = GPIO (4 , 7 );
71+ static struct gpio gpio_3v3aux_enable_n = GPIO (5 , 15 );
7272#endif
7373
7474/* MAX283x GPIO (XCVR_CTL / CS_XCVR) PinMux */
7575#ifdef PRALINE
76- static struct gpio_t gpio_max283x_select = GPIO (6 , 28 );
76+ static struct gpio gpio_max283x_select = GPIO (6 , 28 );
7777#else
78- static struct gpio_t gpio_max283x_select = GPIO (0 , 15 );
78+ static struct gpio gpio_max283x_select = GPIO (0 , 15 );
7979#endif
8080
8181/* MAX5864 SPI chip select (AD_CS / CS_AD) GPIO PinMux */
8282#ifdef PRALINE
83- static struct gpio_t gpio_max5864_select = GPIO (6 , 30 );
83+ static struct gpio gpio_max5864_select = GPIO (6 , 30 );
8484#else
85- static struct gpio_t gpio_max5864_select = GPIO (2 , 7 );
85+ static struct gpio gpio_max5864_select = GPIO (2 , 7 );
8686#endif
8787
8888/* RFFC5071 GPIO serial interface PinMux */
8989// #ifdef RAD1O
90- // static struct gpio_t gpio_rffc5072_select = GPIO(2, 13);
91- // static struct gpio_t gpio_rffc5072_clock = GPIO(5, 6);
92- // static struct gpio_t gpio_rffc5072_data = GPIO(3, 3);
93- // static struct gpio_t gpio_rffc5072_reset = GPIO(2, 14);
90+ // static struct gpio gpio_rffc5072_select = GPIO(2, 13);
91+ // static struct gpio gpio_rffc5072_clock = GPIO(5, 6);
92+ // static struct gpio gpio_rffc5072_data = GPIO(3, 3);
93+ // static struct gpio gpio_rffc5072_reset = GPIO(2, 14);
9494// #endif
9595
9696/* RF supply (VAA) control */
9797#ifdef HACKRF_ONE
98- static struct gpio_t gpio_vaa_disable = GPIO (2 , 9 );
98+ static struct gpio gpio_vaa_disable = GPIO (2 , 9 );
9999#endif
100100#ifdef PRALINE
101- static struct gpio_t gpio_vaa_disable = GPIO (4 , 1 );
101+ static struct gpio gpio_vaa_disable = GPIO (4 , 1 );
102102#endif
103103#ifdef RAD1O
104- static struct gpio_t gpio_vaa_enable = GPIO (2 , 9 );
104+ static struct gpio gpio_vaa_enable = GPIO (2 , 9 );
105105#endif
106106
107- static struct gpio_t gpio_w25q80bv_hold = GPIO (1 , 14 );
108- static struct gpio_t gpio_w25q80bv_wp = GPIO (1 , 15 );
109- static struct gpio_t gpio_w25q80bv_select = GPIO (5 , 11 );
107+ static struct gpio gpio_w25q80bv_hold = GPIO (1 , 14 );
108+ static struct gpio gpio_w25q80bv_wp = GPIO (1 , 15 );
109+ static struct gpio gpio_w25q80bv_select = GPIO (5 , 11 );
110110
111111/* RF switch control */
112112#ifdef HACKRF_ONE
113- static struct gpio_t gpio_hp = GPIO (2 , 0 );
114- static struct gpio_t gpio_lp = GPIO (2 , 10 );
115- static struct gpio_t gpio_tx_mix_bp = GPIO (2 , 11 );
116- static struct gpio_t gpio_no_mix_bypass = GPIO (1 , 0 );
117- static struct gpio_t gpio_rx_mix_bp = GPIO (2 , 12 );
118- static struct gpio_t gpio_tx_amp = GPIO (2 , 15 );
119- static struct gpio_t gpio_tx = GPIO (5 , 15 );
120- static struct gpio_t gpio_mix_bypass = GPIO (5 , 16 );
121- static struct gpio_t gpio_rx = GPIO (5 , 5 );
122- static struct gpio_t gpio_no_tx_amp_pwr = GPIO (3 , 5 );
123- static struct gpio_t gpio_amp_bypass = GPIO (0 , 14 );
124- static struct gpio_t gpio_rx_amp = GPIO (1 , 11 );
125- static struct gpio_t gpio_no_rx_amp_pwr = GPIO (1 , 12 );
113+ static struct gpio gpio_hp = GPIO (2 , 0 );
114+ static struct gpio gpio_lp = GPIO (2 , 10 );
115+ static struct gpio gpio_tx_mix_bp = GPIO (2 , 11 );
116+ static struct gpio gpio_no_mix_bypass = GPIO (1 , 0 );
117+ static struct gpio gpio_rx_mix_bp = GPIO (2 , 12 );
118+ static struct gpio gpio_tx_amp = GPIO (2 , 15 );
119+ static struct gpio gpio_tx = GPIO (5 , 15 );
120+ static struct gpio gpio_mix_bypass = GPIO (5 , 16 );
121+ static struct gpio gpio_rx = GPIO (5 , 5 );
122+ static struct gpio gpio_no_tx_amp_pwr = GPIO (3 , 5 );
123+ static struct gpio gpio_amp_bypass = GPIO (0 , 14 );
124+ static struct gpio gpio_rx_amp = GPIO (1 , 11 );
125+ static struct gpio gpio_no_rx_amp_pwr = GPIO (1 , 12 );
126126#endif
127127#ifdef RAD1O
128- static struct gpio_t gpio_tx_rx_n = GPIO (1 , 11 );
129- static struct gpio_t gpio_tx_rx = GPIO (0 , 14 );
130- static struct gpio_t gpio_by_mix = GPIO (1 , 12 );
131- static struct gpio_t gpio_by_mix_n = GPIO (2 , 10 );
132- static struct gpio_t gpio_by_amp = GPIO (1 , 0 );
133- static struct gpio_t gpio_by_amp_n = GPIO (5 , 5 );
134- static struct gpio_t gpio_mixer_en = GPIO (5 , 16 );
135- static struct gpio_t gpio_low_high_filt = GPIO (2 , 11 );
136- static struct gpio_t gpio_low_high_filt_n = GPIO (2 , 12 );
137- static struct gpio_t gpio_tx_amp = GPIO (2 , 15 );
138- static struct gpio_t gpio_rx_lna = GPIO (5 , 15 );
128+ static struct gpio gpio_tx_rx_n = GPIO (1 , 11 );
129+ static struct gpio gpio_tx_rx = GPIO (0 , 14 );
130+ static struct gpio gpio_by_mix = GPIO (1 , 12 );
131+ static struct gpio gpio_by_mix_n = GPIO (2 , 10 );
132+ static struct gpio gpio_by_amp = GPIO (1 , 0 );
133+ static struct gpio gpio_by_amp_n = GPIO (5 , 5 );
134+ static struct gpio gpio_mixer_en = GPIO (5 , 16 );
135+ static struct gpio gpio_low_high_filt = GPIO (2 , 11 );
136+ static struct gpio gpio_low_high_filt_n = GPIO (2 , 12 );
137+ static struct gpio gpio_tx_amp = GPIO (2 , 15 );
138+ static struct gpio gpio_rx_lna = GPIO (5 , 15 );
139139#endif
140140#ifdef PRALINE
141- static struct gpio_t gpio_tx_en = GPIO (3 , 4 );
142- static struct gpio_t gpio_mix_en_n = GPIO (3 , 2 );
143- static struct gpio_t gpio_mix_en_n_r1_0 = GPIO (5 , 6 );
144- static struct gpio_t gpio_lpf_en = GPIO (4 , 8 );
145- static struct gpio_t gpio_rf_amp_en = GPIO (4 , 9 );
146- static struct gpio_t gpio_ant_bias_en_n = GPIO (1 , 12 );
141+ static struct gpio gpio_tx_en = GPIO (3 , 4 );
142+ static struct gpio gpio_mix_en_n = GPIO (3 , 2 );
143+ static struct gpio gpio_mix_en_n_r1_0 = GPIO (5 , 6 );
144+ static struct gpio gpio_lpf_en = GPIO (4 , 8 );
145+ static struct gpio gpio_rf_amp_en = GPIO (4 , 9 );
146+ static struct gpio gpio_ant_bias_en_n = GPIO (1 , 12 );
147147#endif
148148
149149/* CPLD JTAG interface GPIO pins, FPGA config pins in Praline */
150- static struct gpio_t gpio_cpld_tck = GPIO (3 , 0 );
150+ static struct gpio gpio_cpld_tck = GPIO (3 , 0 );
151151#ifdef PRALINE
152- static struct gpio_t gpio_fpga_cfg_creset = GPIO (2 , 11 );
153- static struct gpio_t gpio_fpga_cfg_cdone = GPIO (5 , 14 );
154- static struct gpio_t gpio_fpga_cfg_spi_cs = GPIO (2 , 10 );
152+ static struct gpio gpio_fpga_cfg_creset = GPIO (2 , 11 );
153+ static struct gpio gpio_fpga_cfg_cdone = GPIO (5 , 14 );
154+ static struct gpio gpio_fpga_cfg_spi_cs = GPIO (2 , 10 );
155155#else
156- static struct gpio_t gpio_cpld_tdo = GPIO (5 , 18 );
156+ static struct gpio gpio_cpld_tdo = GPIO (5 , 18 );
157157#if (defined HACKRF_ONE || defined RAD1O )
158- static struct gpio_t gpio_cpld_tms = GPIO (3 , 4 );
159- static struct gpio_t gpio_cpld_tdi = GPIO (3 , 1 );
158+ static struct gpio gpio_cpld_tms = GPIO (3 , 4 );
159+ static struct gpio gpio_cpld_tdi = GPIO (3 , 1 );
160160#else
161- static struct gpio_t gpio_cpld_tms = GPIO (3 , 1 );
162- static struct gpio_t gpio_cpld_tdi = GPIO (3 , 4 );
161+ static struct gpio gpio_cpld_tms = GPIO (3 , 1 );
162+ static struct gpio gpio_cpld_tdi = GPIO (3 , 4 );
163163#endif
164164#endif
165165
166166#if (defined HACKRF_ONE || defined PRALINE )
167- static struct gpio_t gpio_cpld_pp_tms = GPIO (1 , 1 );
168- static struct gpio_t gpio_cpld_pp_tdo = GPIO (1 , 8 );
167+ static struct gpio gpio_cpld_pp_tms = GPIO (1 , 1 );
168+ static struct gpio gpio_cpld_pp_tdo = GPIO (1 , 8 );
169169#endif
170170
171171/* other CPLD interface GPIO pins */
172172#ifndef PRALINE
173- static struct gpio_t gpio_trigger_enable = GPIO (5 , 12 );
173+ static struct gpio gpio_trigger_enable = GPIO (5 , 12 );
174174#endif
175- static struct gpio_t gpio_q_invert = GPIO (0 , 13 );
175+ static struct gpio gpio_q_invert = GPIO (0 , 13 );
176176
177177/* HackRF One r9 */
178178#ifdef HACKRF_ONE
179- static struct gpio_t gpio_h1r9_rx = GPIO (0 , 7 );
180- static struct gpio_t gpio_h1r9_1v8_enable = GPIO (2 , 9 );
181- static struct gpio_t gpio_h1r9_vaa_disable = GPIO (3 , 6 );
182- static struct gpio_t gpio_h1r9_trigger_enable = GPIO (5 , 5 );
179+ static struct gpio gpio_h1r9_rx = GPIO (0 , 7 );
180+ static struct gpio gpio_h1r9_1v8_enable = GPIO (2 , 9 );
181+ static struct gpio gpio_h1r9_vaa_disable = GPIO (3 , 6 );
182+ static struct gpio gpio_h1r9_trigger_enable = GPIO (5 , 5 );
183183#endif
184184
185185#ifdef PRALINE
186- static struct gpio_t gpio_p2_ctrl0 = GPIO (7 , 3 );
187- static struct gpio_t gpio_p2_ctrl1 = GPIO (7 , 4 );
188- static struct gpio_t gpio_p1_ctrl0 = GPIO (0 , 14 );
189- static struct gpio_t gpio_p1_ctrl1 = GPIO (5 , 16 );
190- static struct gpio_t gpio_p1_ctrl2 = GPIO (3 , 5 );
191- static struct gpio_t gpio_clkin_ctrl = GPIO (0 , 15 );
192- static struct gpio_t gpio_aa_en = GPIO (1 , 7 );
193- static struct gpio_t gpio_trigger_in = GPIO (6 , 26 );
194- static struct gpio_t gpio_trigger_out = GPIO (5 , 6 );
195- static struct gpio_t gpio_pps_out = GPIO (5 , 5 );
186+ static struct gpio gpio_p2_ctrl0 = GPIO (7 , 3 );
187+ static struct gpio gpio_p2_ctrl1 = GPIO (7 , 4 );
188+ static struct gpio gpio_p1_ctrl0 = GPIO (0 , 14 );
189+ static struct gpio gpio_p1_ctrl1 = GPIO (5 , 16 );
190+ static struct gpio gpio_p1_ctrl2 = GPIO (3 , 5 );
191+ static struct gpio gpio_clkin_ctrl = GPIO (0 , 15 );
192+ static struct gpio gpio_aa_en = GPIO (1 , 7 );
193+ static struct gpio gpio_trigger_in = GPIO (6 , 26 );
194+ static struct gpio gpio_trigger_out = GPIO (5 , 6 );
195+ static struct gpio gpio_pps_out = GPIO (5 , 5 );
196196#endif
197197// clang-format on
198198
@@ -247,10 +247,10 @@ const ssp_config_t ssp_config_max283x = {
247247 .gpio_select = & gpio_max283x_select ,
248248};
249249
250- static struct gpio_t gpio_max2831_enable = GPIO (7 , 1 );
251- static struct gpio_t gpio_max2831_rx_enable = GPIO (7 , 2 );
252- static struct gpio_t gpio_max2831_rxhp = GPIO (6 , 29 );
253- static struct gpio_t gpio_max2831_ld = GPIO (4 , 11 );
250+ static struct gpio gpio_max2831_enable = GPIO (7 , 1 );
251+ static struct gpio gpio_max2831_rx_enable = GPIO (7 , 2 );
252+ static struct gpio gpio_max2831_rxhp = GPIO (6 , 29 );
253+ static struct gpio gpio_max2831_ld = GPIO (4 , 11 );
254254
255255max2831_driver_t max283x = {
256256 .bus = & spi_bus_ssp1 ,
0 commit comments