5252#include "gpio_lpc.h"
5353
5454/* GPIO Output PinMux */
55- static struct gpio_t gpio_led [] = {
55+ static struct gpio gpio_led [] = {
5656 GPIO (2 , 1 ),
5757 GPIO (2 , 2 ),
5858 GPIO (2 , 8 ),
@@ -66,134 +66,134 @@ static struct gpio_t gpio_led[] = {
6666
6767// clang-format off
6868#ifndef PRALINE
69- static struct gpio_t gpio_1v8_enable = GPIO (3 , 6 );
69+ static struct gpio gpio_1v8_enable = GPIO (3 , 6 );
7070#else
71- static struct gpio_t gpio_1v2_enable = GPIO (4 , 7 );
72- static struct gpio_t gpio_3v3aux_enable_n = GPIO (5 , 15 );
71+ static struct gpio gpio_1v2_enable = GPIO (4 , 7 );
72+ static struct gpio gpio_3v3aux_enable_n = GPIO (5 , 15 );
7373#endif
7474
7575/* MAX283x GPIO (XCVR_CTL / CS_XCVR) PinMux */
7676#ifdef PRALINE
77- static struct gpio_t gpio_max283x_select = GPIO (6 , 28 );
77+ static struct gpio gpio_max283x_select = GPIO (6 , 28 );
7878#else
79- static struct gpio_t gpio_max283x_select = GPIO (0 , 15 );
79+ static struct gpio gpio_max283x_select = GPIO (0 , 15 );
8080#endif
8181
8282/* MAX5864 SPI chip select (AD_CS / CS_AD) GPIO PinMux */
8383#ifdef PRALINE
84- static struct gpio_t gpio_max5864_select = GPIO (6 , 30 );
84+ static struct gpio gpio_max5864_select = GPIO (6 , 30 );
8585#else
86- static struct gpio_t gpio_max5864_select = GPIO (2 , 7 );
86+ static struct gpio gpio_max5864_select = GPIO (2 , 7 );
8787#endif
8888
8989/* RFFC5071 GPIO serial interface PinMux */
9090// #ifdef RAD1O
91- // static struct gpio_t gpio_rffc5072_select = GPIO(2, 13);
92- // static struct gpio_t gpio_rffc5072_clock = GPIO(5, 6);
93- // static struct gpio_t gpio_rffc5072_data = GPIO(3, 3);
94- // static struct gpio_t gpio_rffc5072_reset = GPIO(2, 14);
91+ // static struct gpio gpio_rffc5072_select = GPIO(2, 13);
92+ // static struct gpio gpio_rffc5072_clock = GPIO(5, 6);
93+ // static struct gpio gpio_rffc5072_data = GPIO(3, 3);
94+ // static struct gpio gpio_rffc5072_reset = GPIO(2, 14);
9595// #endif
9696
9797/* RF supply (VAA) control */
9898#ifdef HACKRF_ONE
99- static struct gpio_t gpio_vaa_disable = GPIO (2 , 9 );
99+ static struct gpio gpio_vaa_disable = GPIO (2 , 9 );
100100#endif
101101#ifdef PRALINE
102- static struct gpio_t gpio_vaa_disable = GPIO (4 , 1 );
102+ static struct gpio gpio_vaa_disable = GPIO (4 , 1 );
103103#endif
104104#ifdef RAD1O
105- static struct gpio_t gpio_vaa_enable = GPIO (2 , 9 );
105+ static struct gpio gpio_vaa_enable = GPIO (2 , 9 );
106106#endif
107107
108- static struct gpio_t gpio_w25q80bv_hold = GPIO (1 , 14 );
109- static struct gpio_t gpio_w25q80bv_wp = GPIO (1 , 15 );
110- static struct gpio_t gpio_w25q80bv_select = GPIO (5 , 11 );
108+ static struct gpio gpio_w25q80bv_hold = GPIO (1 , 14 );
109+ static struct gpio gpio_w25q80bv_wp = GPIO (1 , 15 );
110+ static struct gpio gpio_w25q80bv_select = GPIO (5 , 11 );
111111
112112/* RF switch control */
113113#ifdef HACKRF_ONE
114- static struct gpio_t gpio_hp = GPIO (2 , 0 );
115- static struct gpio_t gpio_lp = GPIO (2 , 10 );
116- static struct gpio_t gpio_tx_mix_bp = GPIO (2 , 11 );
117- static struct gpio_t gpio_no_mix_bypass = GPIO (1 , 0 );
118- static struct gpio_t gpio_rx_mix_bp = GPIO (2 , 12 );
119- static struct gpio_t gpio_tx_amp = GPIO (2 , 15 );
120- static struct gpio_t gpio_tx = GPIO (5 , 15 );
121- static struct gpio_t gpio_mix_bypass = GPIO (5 , 16 );
122- static struct gpio_t gpio_rx = GPIO (5 , 5 );
123- static struct gpio_t gpio_no_tx_amp_pwr = GPIO (3 , 5 );
124- static struct gpio_t gpio_amp_bypass = GPIO (0 , 14 );
125- static struct gpio_t gpio_rx_amp = GPIO (1 , 11 );
126- static struct gpio_t gpio_no_rx_amp_pwr = GPIO (1 , 12 );
114+ static struct gpio gpio_hp = GPIO (2 , 0 );
115+ static struct gpio gpio_lp = GPIO (2 , 10 );
116+ static struct gpio gpio_tx_mix_bp = GPIO (2 , 11 );
117+ static struct gpio gpio_no_mix_bypass = GPIO (1 , 0 );
118+ static struct gpio gpio_rx_mix_bp = GPIO (2 , 12 );
119+ static struct gpio gpio_tx_amp = GPIO (2 , 15 );
120+ static struct gpio gpio_tx = GPIO (5 , 15 );
121+ static struct gpio gpio_mix_bypass = GPIO (5 , 16 );
122+ static struct gpio gpio_rx = GPIO (5 , 5 );
123+ static struct gpio gpio_no_tx_amp_pwr = GPIO (3 , 5 );
124+ static struct gpio gpio_amp_bypass = GPIO (0 , 14 );
125+ static struct gpio gpio_rx_amp = GPIO (1 , 11 );
126+ static struct gpio gpio_no_rx_amp_pwr = GPIO (1 , 12 );
127127#endif
128128#ifdef RAD1O
129- static struct gpio_t gpio_tx_rx_n = GPIO (1 , 11 );
130- static struct gpio_t gpio_tx_rx = GPIO (0 , 14 );
131- static struct gpio_t gpio_by_mix = GPIO (1 , 12 );
132- static struct gpio_t gpio_by_mix_n = GPIO (2 , 10 );
133- static struct gpio_t gpio_by_amp = GPIO (1 , 0 );
134- static struct gpio_t gpio_by_amp_n = GPIO (5 , 5 );
135- static struct gpio_t gpio_mixer_en = GPIO (5 , 16 );
136- static struct gpio_t gpio_low_high_filt = GPIO (2 , 11 );
137- static struct gpio_t gpio_low_high_filt_n = GPIO (2 , 12 );
138- static struct gpio_t gpio_tx_amp = GPIO (2 , 15 );
139- static struct gpio_t gpio_rx_lna = GPIO (5 , 15 );
129+ static struct gpio gpio_tx_rx_n = GPIO (1 , 11 );
130+ static struct gpio gpio_tx_rx = GPIO (0 , 14 );
131+ static struct gpio gpio_by_mix = GPIO (1 , 12 );
132+ static struct gpio gpio_by_mix_n = GPIO (2 , 10 );
133+ static struct gpio gpio_by_amp = GPIO (1 , 0 );
134+ static struct gpio gpio_by_amp_n = GPIO (5 , 5 );
135+ static struct gpio gpio_mixer_en = GPIO (5 , 16 );
136+ static struct gpio gpio_low_high_filt = GPIO (2 , 11 );
137+ static struct gpio gpio_low_high_filt_n = GPIO (2 , 12 );
138+ static struct gpio gpio_tx_amp = GPIO (2 , 15 );
139+ static struct gpio gpio_rx_lna = GPIO (5 , 15 );
140140#endif
141141#ifdef PRALINE
142- static struct gpio_t gpio_tx_en = GPIO (3 , 4 );
143- static struct gpio_t gpio_mix_en_n = GPIO (3 , 2 );
144- static struct gpio_t gpio_mix_en_n_r1_0 = GPIO (5 , 6 );
145- static struct gpio_t gpio_lpf_en = GPIO (4 , 8 );
146- static struct gpio_t gpio_rf_amp_en = GPIO (4 , 9 );
147- static struct gpio_t gpio_ant_bias_en_n = GPIO (1 , 12 );
142+ static struct gpio gpio_tx_en = GPIO (3 , 4 );
143+ static struct gpio gpio_mix_en_n = GPIO (3 , 2 );
144+ static struct gpio gpio_mix_en_n_r1_0 = GPIO (5 , 6 );
145+ static struct gpio gpio_lpf_en = GPIO (4 , 8 );
146+ static struct gpio gpio_rf_amp_en = GPIO (4 , 9 );
147+ static struct gpio gpio_ant_bias_en_n = GPIO (1 , 12 );
148148#endif
149149
150150/* CPLD JTAG interface GPIO pins, FPGA config pins in Praline */
151- static struct gpio_t gpio_cpld_tck = GPIO (3 , 0 );
151+ static struct gpio gpio_cpld_tck = GPIO (3 , 0 );
152152#ifdef PRALINE
153- static struct gpio_t gpio_fpga_cfg_creset = GPIO (2 , 11 );
154- static struct gpio_t gpio_fpga_cfg_cdone = GPIO (5 , 14 );
155- static struct gpio_t gpio_fpga_cfg_spi_cs = GPIO (2 , 10 );
153+ static struct gpio gpio_fpga_cfg_creset = GPIO (2 , 11 );
154+ static struct gpio gpio_fpga_cfg_cdone = GPIO (5 , 14 );
155+ static struct gpio gpio_fpga_cfg_spi_cs = GPIO (2 , 10 );
156156#else
157- static struct gpio_t gpio_cpld_tdo = GPIO (5 , 18 );
157+ static struct gpio gpio_cpld_tdo = GPIO (5 , 18 );
158158#if (defined HACKRF_ONE || defined RAD1O )
159- static struct gpio_t gpio_cpld_tms = GPIO (3 , 4 );
160- static struct gpio_t gpio_cpld_tdi = GPIO (3 , 1 );
159+ static struct gpio gpio_cpld_tms = GPIO (3 , 4 );
160+ static struct gpio gpio_cpld_tdi = GPIO (3 , 1 );
161161#else
162- static struct gpio_t gpio_cpld_tms = GPIO (3 , 1 );
163- static struct gpio_t gpio_cpld_tdi = GPIO (3 , 4 );
162+ static struct gpio gpio_cpld_tms = GPIO (3 , 1 );
163+ static struct gpio gpio_cpld_tdi = GPIO (3 , 4 );
164164#endif
165165#endif
166166
167167#if (defined HACKRF_ONE || defined PRALINE )
168- static struct gpio_t gpio_cpld_pp_tms = GPIO (1 , 1 );
169- static struct gpio_t gpio_cpld_pp_tdo = GPIO (1 , 8 );
168+ static struct gpio gpio_cpld_pp_tms = GPIO (1 , 1 );
169+ static struct gpio gpio_cpld_pp_tdo = GPIO (1 , 8 );
170170#endif
171171
172172/* other CPLD interface GPIO pins */
173173#ifndef PRALINE
174- static struct gpio_t gpio_trigger_enable = GPIO (5 , 12 );
174+ static struct gpio gpio_trigger_enable = GPIO (5 , 12 );
175175#endif
176- static struct gpio_t gpio_q_invert = GPIO (0 , 13 );
176+ static struct gpio gpio_q_invert = GPIO (0 , 13 );
177177
178178/* HackRF One r9 */
179179#ifdef HACKRF_ONE
180- static struct gpio_t gpio_h1r9_rx = GPIO (0 , 7 );
181- static struct gpio_t gpio_h1r9_1v8_enable = GPIO (2 , 9 );
182- static struct gpio_t gpio_h1r9_vaa_disable = GPIO (3 , 6 );
183- static struct gpio_t gpio_h1r9_trigger_enable = GPIO (5 , 5 );
180+ static struct gpio gpio_h1r9_rx = GPIO (0 , 7 );
181+ static struct gpio gpio_h1r9_1v8_enable = GPIO (2 , 9 );
182+ static struct gpio gpio_h1r9_vaa_disable = GPIO (3 , 6 );
183+ static struct gpio gpio_h1r9_trigger_enable = GPIO (5 , 5 );
184184#endif
185185
186186#ifdef PRALINE
187- static struct gpio_t gpio_p2_ctrl0 = GPIO (7 , 3 );
188- static struct gpio_t gpio_p2_ctrl1 = GPIO (7 , 4 );
189- static struct gpio_t gpio_p1_ctrl0 = GPIO (0 , 14 );
190- static struct gpio_t gpio_p1_ctrl1 = GPIO (5 , 16 );
191- static struct gpio_t gpio_p1_ctrl2 = GPIO (3 , 5 );
192- static struct gpio_t gpio_clkin_ctrl = GPIO (0 , 15 );
193- static struct gpio_t gpio_aa_en = GPIO (1 , 7 );
194- static struct gpio_t gpio_trigger_in = GPIO (6 , 26 );
195- static struct gpio_t gpio_trigger_out = GPIO (5 , 6 );
196- static struct gpio_t gpio_pps_out = GPIO (5 , 5 );
187+ static struct gpio gpio_p2_ctrl0 = GPIO (7 , 3 );
188+ static struct gpio gpio_p2_ctrl1 = GPIO (7 , 4 );
189+ static struct gpio gpio_p1_ctrl0 = GPIO (0 , 14 );
190+ static struct gpio gpio_p1_ctrl1 = GPIO (5 , 16 );
191+ static struct gpio gpio_p1_ctrl2 = GPIO (3 , 5 );
192+ static struct gpio gpio_clkin_ctrl = GPIO (0 , 15 );
193+ static struct gpio gpio_aa_en = GPIO (1 , 7 );
194+ static struct gpio gpio_trigger_in = GPIO (6 , 26 );
195+ static struct gpio gpio_trigger_out = GPIO (5 , 6 );
196+ static struct gpio gpio_pps_out = GPIO (5 , 5 );
197197#endif
198198// clang-format on
199199
@@ -248,10 +248,10 @@ const ssp_config_t ssp_config_max283x = {
248248 .gpio_select = & gpio_max283x_select ,
249249};
250250
251- static struct gpio_t gpio_max2831_enable = GPIO (7 , 1 );
252- static struct gpio_t gpio_max2831_rx_enable = GPIO (7 , 2 );
253- static struct gpio_t gpio_max2831_rxhp = GPIO (6 , 29 );
254- static struct gpio_t gpio_max2831_ld = GPIO (4 , 11 );
251+ static struct gpio gpio_max2831_enable = GPIO (7 , 1 );
252+ static struct gpio gpio_max2831_rx_enable = GPIO (7 , 2 );
253+ static struct gpio gpio_max2831_rxhp = GPIO (6 , 29 );
254+ static struct gpio gpio_max2831_ld = GPIO (4 , 11 );
255255
256256max2831_driver_t max283x = {
257257 .bus = & spi_bus_ssp1 ,
0 commit comments