source: rtems/bsps/arm/lpc24xx/include/bsp/io.h @ 98fc6014

5
Last change on this file since 98fc6014 was 98fc6014, checked in by Sebastian Huber <sebastian.huber@…>, on 06/04/19 at 10:04:55

bsp/lpc24xx: Fix LPC24XX_IO_PORT_COUNT

  • Property mode set to 100644
File size: 32.0 KB
RevLine 
[9364cf66]1/**
2 * @file
3 *
[c991eeec]4 * @ingroup RTEMSBSPsARMLPC24XX_io
[9364cf66]5 *
[ba938b8d]6 * @brief Input and output module.
[9364cf66]7 */
8
9/*
[14ee5a1e]10 * Copyright (c) 2009-2012 embedded brains GmbH.  All rights reserved.
[d74ed4a]11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
[9364cf66]17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
[c499856]20 * http://www.rtems.org/license/LICENSE.
[9364cf66]21 */
22
23#ifndef LIBBSP_ARM_LPC24XX_IO_H
24#define LIBBSP_ARM_LPC24XX_IO_H
25
26#include <rtems.h>
27
28#include <bsp/lpc24xx.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
[ba938b8d]34/**
35 * @defgroup lpc24xx_io IO Support and Configuration
36 *
[c991eeec]37 * @ingroup RTEMSBSPsARMLPC24XX
[ba938b8d]38 *
39 * @brief Input and output module.
40 *
41 * @{
42 */
43
[98fc6014]44#ifdef ARM_MULTILIB_ARCH_V7M
45  #define LPC24XX_IO_PORT_COUNT 6U
46#else
47  #define LPC24XX_IO_PORT_COUNT 5U
48#endif
[9364cf66]49
50#define LPC24XX_IO_INDEX_MAX (LPC24XX_IO_PORT_COUNT * 32U)
51
[c468f18b]52#define LPC24XX_IO_INDEX_BY_PORT(port, bit) (((port) << 5U) + (bit))
[9364cf66]53
[4a6cc2a]54#define LPC24XX_IO_PORT(index) ((index) >> 5U)
[9364cf66]55
[4a6cc2a]56#define LPC24XX_IO_PORT_BIT(index) ((index) & 0x1fU)
[9364cf66]57
58typedef enum {
[4a6cc2a]59  #ifdef ARM_MULTILIB_ARCH_V4
60    LPC24XX_MODULE_ACF,
61  #endif
62    LPC24XX_MODULE_ADC,
63  #ifdef ARM_MULTILIB_ARCH_V4
64    LPC24XX_MODULE_BAT_RAM,
65  #endif
[c468f18b]66  LPC24XX_MODULE_CAN_0,
67  LPC24XX_MODULE_CAN_1,
[9364cf66]68  LPC24XX_MODULE_DAC,
69  LPC24XX_MODULE_EMC,
70  LPC24XX_MODULE_ETHERNET,
71  LPC24XX_MODULE_GPDMA,
72  LPC24XX_MODULE_GPIO,
[c468f18b]73  LPC24XX_MODULE_I2C_0,
74  LPC24XX_MODULE_I2C_1,
75  LPC24XX_MODULE_I2C_2,
[9364cf66]76  LPC24XX_MODULE_I2S,
77  LPC24XX_MODULE_LCD,
78  LPC24XX_MODULE_MCI,
[14ee5a1e]79  #ifdef ARM_MULTILIB_ARCH_V7M
80    LPC24XX_MODULE_MCPWM,
81  #endif
[9364cf66]82  LPC24XX_MODULE_PCB,
[c468f18b]83  LPC24XX_MODULE_PWM_0,
84  LPC24XX_MODULE_PWM_1,
[14ee5a1e]85  #ifdef ARM_MULTILIB_ARCH_V7M
86    LPC24XX_MODULE_QEI,
87  #endif
[9364cf66]88  LPC24XX_MODULE_RTC,
[4a6cc2a]89  #ifdef ARM_MULTILIB_ARCH_V4
90    LPC24XX_MODULE_SPI,
91  #endif
[c468f18b]92  LPC24XX_MODULE_SSP_0,
93  LPC24XX_MODULE_SSP_1,
[14ee5a1e]94  #ifdef ARM_MULTILIB_ARCH_V7M
95    LPC24XX_MODULE_SSP_2,
96  #endif
[9364cf66]97  LPC24XX_MODULE_SYSCON,
[c468f18b]98  LPC24XX_MODULE_TIMER_0,
99  LPC24XX_MODULE_TIMER_1,
100  LPC24XX_MODULE_TIMER_2,
101  LPC24XX_MODULE_TIMER_3,
102  LPC24XX_MODULE_UART_0,
103  LPC24XX_MODULE_UART_1,
104  LPC24XX_MODULE_UART_2,
105  LPC24XX_MODULE_UART_3,
[14ee5a1e]106  #ifdef ARM_MULTILIB_ARCH_V7M
107    LPC24XX_MODULE_UART_4,
108  #endif
[4a6cc2a]109  #ifdef ARM_MULTILIB_ARCH_V4
110    LPC24XX_MODULE_WDT,
111  #endif
112  LPC24XX_MODULE_USB
[9364cf66]113} lpc24xx_module;
114
[4a6cc2a]115#define LPC24XX_MODULE_COUNT (LPC24XX_MODULE_USB + 1)
[c468f18b]116
[9364cf66]117typedef enum {
[4a6cc2a]118  LPC24XX_MODULE_PCLK_DEFAULT = 0x4U,
[9364cf66]119  LPC24XX_MODULE_CCLK = 0x1U,
120  LPC24XX_MODULE_CCLK_2 = 0x2U,
121  LPC24XX_MODULE_CCLK_4 = 0x0U,
122  LPC24XX_MODULE_CCLK_6 = 0x3U,
123  LPC24XX_MODULE_CCLK_8 = 0x3U
124} lpc24xx_module_clock;
125
126#define LPC24XX_MODULE_CLOCK_MASK 0x3U
127
128typedef enum {
129  LPC24XX_GPIO_DEFAULT = 0x0U,
[4a6cc2a]130  LPC24XX_GPIO_RESISTOR_PULL_UP = 0x0U,
[9364cf66]131  LPC24XX_GPIO_RESISTOR_NONE = 0x1U,
[4a6cc2a]132  LPC24XX_GPIO_RESISTOR_PULL_DOWN = 0x2U,
[9364cf66]133  LPC24XX_GPIO_INPUT = 0x0U,
[14ee5a1e]134  #ifdef ARM_MULTILIB_ARCH_V7M
135    LPC17XX_GPIO_REPEATER = 0x3U,
136    LPC17XX_GPIO_HYSTERESIS = IOCON_HYS,
137    LPC17XX_GPIO_INPUT_INVERT = IOCON_INV,
138    LPC17XX_GPIO_FAST_MODE = IOCON_SLEW,
139    LPC17XX_GPIO_OPEN_DRAIN = IOCON_OD,
140    LPC17XX_GPIO_INPUT_FILTER = IOCON_FILTER,
141  #endif
[4a6cc2a]142  LPC24XX_GPIO_OUTPUT = 0x8000U
[9364cf66]143} lpc24xx_gpio_settings;
144
145rtems_status_code lpc24xx_module_enable(
146  lpc24xx_module module,
147  lpc24xx_module_clock clock
148);
149
150rtems_status_code lpc24xx_module_disable(
[c468f18b]151  lpc24xx_module module
[9364cf66]152);
153
[4e0755c8]154bool lpc24xx_module_is_enabled(lpc24xx_module module);
155
[9364cf66]156rtems_status_code lpc24xx_gpio_config(
157  unsigned index,
158  lpc24xx_gpio_settings settings
159);
160
[c468f18b]161static inline void lpc24xx_gpio_set(unsigned index)
[9364cf66]162{
163  if (index <= LPC24XX_IO_INDEX_MAX) {
[c468f18b]164    unsigned port = LPC24XX_IO_PORT(index);
165    unsigned bit = LPC24XX_IO_PORT_BIT(index);
[9364cf66]166
167    LPC24XX_FIO [port].set = 1U << bit;
168  }
169}
170
[c468f18b]171static inline void lpc24xx_gpio_clear(unsigned index)
[9364cf66]172{
173  if (index <= LPC24XX_IO_INDEX_MAX) {
[c468f18b]174    unsigned port = LPC24XX_IO_PORT(index);
175    unsigned bit = LPC24XX_IO_PORT_BIT(index);
[9364cf66]176
177    LPC24XX_FIO [port].clr = 1U << bit;
178  }
179}
180
[c468f18b]181static inline void lpc24xx_gpio_write(unsigned index, bool value)
[9364cf66]182{
183  if (value) {
[c468f18b]184    lpc24xx_gpio_set(index);
[9364cf66]185  } else {
[c468f18b]186    lpc24xx_gpio_clear(index);
[9364cf66]187  }
188}
189
[c468f18b]190static inline bool lpc24xx_gpio_get(unsigned index)
[9364cf66]191{
192  if (index <= LPC24XX_IO_INDEX_MAX) {
[c468f18b]193    unsigned port = LPC24XX_IO_PORT(index);
194    unsigned bit = LPC24XX_IO_PORT_BIT(index);
[9364cf66]195
196    return (LPC24XX_FIO [port].pin & (1U << bit)) != 0;
197  } else {
198    return false;
199  }
200}
201
[d74ed4a]202typedef enum {
203  /**
204   * @brief Sets the pin function.
205   */
[4a6cc2a]206  LPC24XX_PIN_SET_FUNCTION,
[d74ed4a]207
208  /**
209   * @brief Checks if all pins are configured with the specified function.
210   */
211  LPC24XX_PIN_CHECK_FUNCTION,
212
213  /**
214   * @brief Configures the pins as input.
215   */
216  LPC24XX_PIN_SET_INPUT,
217
218  /**
219   * @brief Checks if all pins are configured as input.
220   */
221  LPC24XX_PIN_CHECK_INPUT
222} lpc24xx_pin_action;
223
224typedef union {
225  struct {
226    uint16_t port : 3;
[4a6cc2a]227    uint16_t port_bit : 5;
[d74ed4a]228    uint16_t function : 3;
[4a6cc2a]229    uint16_t type : 4;
230    uint16_t range : 1;
[d74ed4a]231  } fields;
232  uint16_t value;
233} lpc24xx_pin_range;
234
[4a6cc2a]235typedef enum {
236  LPC24XX_PIN_FUNCTION_00,
237  LPC24XX_PIN_FUNCTION_01,
238  LPC24XX_PIN_FUNCTION_10,
239  LPC24XX_PIN_FUNCTION_11
240} lpc24xx_pin_function;
[d74ed4a]241
[4a6cc2a]242typedef enum {
243  LPC17XX_PIN_TYPE_DEFAULT,
244  LPC17XX_PIN_TYPE_ADC,
245  LPC17XX_PIN_TYPE_DAC,
246  LPC17XX_PIN_TYPE_I2C,
[e9e5b92d]247  LPC17XX_PIN_TYPE_I2C_FAST_PLUS,
[0a6b81a]248  LPC17XX_PIN_TYPE_OPEN_DRAIN,
249  LPC17XX_PIN_TYPE_FAST_SLEW_RATE
[4a6cc2a]250} lpc17xx_pin_type;
251
252#ifdef ARM_MULTILIB_ARCH_V4
253  #define LPC24XX_PIN(p, i, f0, f1) { { p, i, f0, 0, 0 } }
254  #define LPC24XX_PIN_WITH_TYPE(p, i, f0, f1, t) { { p, i, f0, t, 0 } }
255  #define LPC24XX_PIN_RANGE(p, i, j, f0, f1) \
256    { { p, i, f0, 0, 0 } }, { { p, j, f0, 0, 1 } }
[50d8d32]257  #define LPC24XX_PIN_RANGE_WITH_TYPE(p, i, j, f0, f1, t) \
258    { { p, i, f0, t, 0 } }, { { p, j, f0, t, 1 } }
[14ee5a1e]259#else
260  #define LPC24XX_PIN(p, i, f0, f1) { { p, i, f1, 0, 0 } }
261  #define LPC24XX_PIN_WITH_TYPE(p, i, f0, f1, t) { { p, i, f1, t, 0 } }
262  #define LPC24XX_PIN_RANGE(p, i, j, f0, f1) \
263    { { p, i, f1, 0, 0 } }, { { p, j, f1, 0, 1 } }
[50d8d32]264  #define LPC24XX_PIN_RANGE_WITH_TYPE(p, i, j, f0, f1, t) \
265    { { p, i, f1, t, 0 } }, { { p, j, f1, t, 1 } }
[4a6cc2a]266#endif
267
268#define LPC24XX_PIN_TERMINAL { { 0x7, 0x1f, 0x7, 0xf, 0x1 } }
[d74ed4a]269
270/**
271 * @brief Performs the @a action with the @a pins
272 *
273 * @code
274 * #include <assert.h>
275 * #include <bsp/io.h>
276 *
277 * void example(void)
278 * {
279 *   static const lpc24xx_pin_range pins [] = {
280 *     LPC24XX_PIN_I2S_RX_CLK_P0_4,
281 *     LPC24XX_PIN_I2S_RX_WS_P0_5,
282 *     LPC24XX_PIN_I2S_RX_SDA_P0_6,
283 *     LPC24XX_PIN_I2S_TX_CLK_P0_7,
284 *     LPC24XX_PIN_I2S_TX_WS_P0_8,
285 *     LPC24XX_PIN_I2S_TX_SDA_P0_9,
286 *     LPC24XX_PIN_TERMINAL
287 *   };
288 *   rtems_status_code sc = RTEMS_SUCCESSFUL;
289 *
290 *   sc = lpc24xx_module_enable(LPC24XX_MODULE_I2S, LPC24XX_MODULE_CCLK_8);
291 *   assert(sc == RTEMS_SUCCESSFUL);
292 *   sc = lpc24xx_pin_config(&pins [0], LPC24XX_PIN_SET_FUNCTION);
293 *   assert(sc == RTEMS_SUCCESSFUL);
294 * }
295 * @endcode
296 *
297 * @retval RTEMS_SUCCESSFUL Successful operation.
298 * @retval RTEMS_IO_ERROR Check failed.
299 * @retval RTEMS_NOT_DEFINED Invalid action.
300 */
301rtems_status_code lpc24xx_pin_config(
302  const lpc24xx_pin_range *pins,
303  lpc24xx_pin_action action
304);
305
[986ddf5]306/**
307 * @brief Returns the first pin index of a pin range.
308 */
309static inline unsigned lpc24xx_pin_get_first_index(
310  const lpc24xx_pin_range *range
311)
312{
313  return LPC24XX_IO_INDEX_BY_PORT(range->fields.port, range->fields.port_bit);
314}
315
[d74ed4a]316/**
317 * @name ADC Pins
318 *
319 * @{
320 */
321
322#define LPC24XX_PIN_ADC_CHANNEL_0 \
[4a6cc2a]323  LPC24XX_PIN_WITH_TYPE(0, 23, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]324#define LPC24XX_PIN_ADC_CHANNEL_1 \
[4a6cc2a]325  LPC24XX_PIN_WITH_TYPE(0, 24, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]326#define LPC24XX_PIN_ADC_CHANNEL_2 \
[4a6cc2a]327  LPC24XX_PIN_WITH_TYPE(0, 25, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]328#define LPC24XX_PIN_ADC_CHANNEL_3 \
[4a6cc2a]329  LPC24XX_PIN_WITH_TYPE(0, 26, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]330#define LPC24XX_PIN_ADC_CHANNEL_4 \
[4a6cc2a]331  LPC24XX_PIN_WITH_TYPE(1, 30, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]332#define LPC24XX_PIN_ADC_CHANNEL_5 \
[4a6cc2a]333  LPC24XX_PIN_WITH_TYPE(1, 31, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]334#define LPC24XX_PIN_ADC_CHANNEL_6 \
[4a6cc2a]335  LPC24XX_PIN_WITH_TYPE(0, 12, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_ADC)
[d74ed4a]336#define LPC24XX_PIN_ADC_CHANNEL_7 \
[4a6cc2a]337  LPC24XX_PIN_WITH_TYPE(0, 13, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_ADC)
338
339/** @} */
340
341/**
342 * @name CAN 0 Pins
343 *
344 * @{
345 */
346
[f3cdf279]347#define LPC24XX_PIN_CAN_0_RD_P0_0 \
[4a6cc2a]348  LPC24XX_PIN(0, 0, LPC24XX_PIN_FUNCTION_01, 1)
349
[f3cdf279]350#define LPC24XX_PIN_CAN_0_RD_P0_21 \
351  LPC24XX_PIN(0, 21, LPC24XX_PIN_FUNCTION_11, 4)
352
353#define LPC24XX_PIN_CAN_0_TD_P0_1 \
[4a6cc2a]354  LPC24XX_PIN(0, 1, LPC24XX_PIN_FUNCTION_01, 1)
355
[f3cdf279]356#define LPC24XX_PIN_CAN_0_TD_P0_22 \
357  LPC24XX_PIN(0, 22, LPC24XX_PIN_FUNCTION_11, 4)
358
[4a6cc2a]359/** @} */
360
361/**
362 * @name CAN 1 Pins
363 *
364 * @{
365 */
366
[f3cdf279]367#define LPC24XX_PIN_CAN_1_RD_P0_4 \
[4a6cc2a]368  LPC24XX_PIN(0, 4, LPC24XX_PIN_FUNCTION_10, 2)
369
[f3cdf279]370#define LPC24XX_PIN_CAN_1_RD_P2_7 \
371  LPC24XX_PIN(2, 7, LPC24XX_PIN_FUNCTION_01, 1)
372
373#define LPC24XX_PIN_CAN_1_TD_P0_5 \
[4a6cc2a]374  LPC24XX_PIN(0, 5, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]375
[f3cdf279]376#define LPC24XX_PIN_CAN_1_TD_P2_8 \
377  LPC24XX_PIN(2, 8, LPC24XX_PIN_FUNCTION_01, 1)
378
[d74ed4a]379/** @} */
380
381/**
382 * @name DAC Pins
383 *
384 * @{
385 */
386
387#define LPC24XX_PIN_DAC \
[4a6cc2a]388  LPC24XX_PIN_WITH_TYPE(0, 26, LPC24XX_PIN_FUNCTION_10, 2, LPC17XX_PIN_TYPE_DAC)
[d74ed4a]389
390/** @} */
391
392/**
393 * @name Ethernet Pins
394 *
395 * @{
396 */
397
398#define LPC24XX_PIN_ETHERNET_MII \
[4a6cc2a]399  LPC24XX_PIN_RANGE(1, 0, 17, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]400
401#define LPC24XX_PIN_ETHERNET_RMII_0 \
[4a6cc2a]402  LPC24XX_PIN_RANGE(1, 0, 1, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]403#define LPC24XX_PIN_ETHERNET_RMII_1 \
[4a6cc2a]404  LPC24XX_PIN(1, 4, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]405#define LPC24XX_PIN_ETHERNET_RMII_2 \
[4a6cc2a]406  LPC24XX_PIN_RANGE(1, 8, 10, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]407#define LPC24XX_PIN_ETHERNET_RMII_3 \
[4a6cc2a]408  LPC24XX_PIN_RANGE(1, 14, 17, LPC24XX_PIN_FUNCTION_01, 1)
409
410/** @} */
411
412/**
413 * @name External Interrupt Pins
414 *
415 * @{
416 */
417
418#define LPC24XX_PIN_EINT_0 \
419  LPC24XX_PIN(2, 10, LPC24XX_PIN_FUNCTION_01, 1)
420#define LPC24XX_PIN_EINT_1 \
421  LPC24XX_PIN(2, 11, LPC24XX_PIN_FUNCTION_01, 1)
422#define LPC24XX_PIN_EINT_2 \
423  LPC24XX_PIN(2, 12, LPC24XX_PIN_FUNCTION_01, 1)
424#define LPC24XX_PIN_EINT_3 \
425  LPC24XX_PIN(2, 13, LPC24XX_PIN_FUNCTION_01, 1)
426
427/** @} */
428
429/**
430 * @name External Memory Controller (EMC) Pins
431 *
432 * @{
433 */
434
[50d8d32]435#define LPC24XX_PIN_EMC(p, i) \
436  LPC24XX_PIN_WITH_TYPE(p, i, LPC24XX_PIN_FUNCTION_01, 1, \
437    LPC17XX_PIN_TYPE_FAST_SLEW_RATE)
438
439#define LPC24XX_PIN_EMC_RANGE(p, i, j) \
440  LPC24XX_PIN_RANGE_WITH_TYPE(p, i, j, LPC24XX_PIN_FUNCTION_01, 1, \
441    LPC17XX_PIN_TYPE_FAST_SLEW_RATE)
442
443#define LPC24XX_PIN_EMC_CS_0 LPC24XX_PIN_EMC(4, 30)
444#define LPC24XX_PIN_EMC_CS_1 LPC24XX_PIN_EMC(4, 31)
445#define LPC24XX_PIN_EMC_CS_2 LPC24XX_PIN_EMC(2, 14)
446#define LPC24XX_PIN_EMC_CS_3 LPC24XX_PIN_EMC(2, 15)
447
448#define LPC24XX_PIN_EMC_DYCS_0 LPC24XX_PIN_EMC(2, 20)
449#define LPC24XX_PIN_EMC_DYCS_1 LPC24XX_PIN_EMC(2, 21)
450#define LPC24XX_PIN_EMC_DYCS_2 LPC24XX_PIN_EMC(2, 22)
451#define LPC24XX_PIN_EMC_DYCS_3 LPC24XX_PIN_EMC(2, 23)
452
453#define LPC24XX_PIN_EMC_OE LPC24XX_PIN_EMC(4, 24)
454#define LPC24XX_PIN_EMC_WE LPC24XX_PIN_EMC(4, 25)
455#define LPC24XX_PIN_EMC_CAS LPC24XX_PIN_EMC(2, 16)
456#define LPC24XX_PIN_EMC_RAS LPC24XX_PIN_EMC(2, 17)
457
458#define LPC24XX_PIN_EMC_CLK_0 LPC24XX_PIN_EMC(2, 18)
459#define LPC24XX_PIN_EMC_CLK_1 LPC24XX_PIN_EMC(2, 19)
460
461#define LPC24XX_PIN_EMC_CKE_0 LPC24XX_PIN_EMC(2, 24)
462#define LPC24XX_PIN_EMC_CKE_1 LPC24XX_PIN_EMC(2, 25)
463#define LPC24XX_PIN_EMC_CKE_2 LPC24XX_PIN_EMC(2, 26)
464#define LPC24XX_PIN_EMC_CKE_3 LPC24XX_PIN_EMC(2, 27)
465
466#define LPC24XX_PIN_EMC_DQM_0 LPC24XX_PIN_EMC(2, 28)
467#define LPC24XX_PIN_EMC_DQM_1 LPC24XX_PIN_EMC(2, 29)
468#define LPC24XX_PIN_EMC_DQM_2 LPC24XX_PIN_EMC(2, 30)
469#define LPC24XX_PIN_EMC_DQM_3 LPC24XX_PIN_EMC(2, 31)
470
471#define LPC24XX_PIN_EMC_BLS0 LPC24XX_PIN_EMC(4, 26)
472#define LPC24XX_PIN_EMC_BLS1 LPC24XX_PIN_EMC(4, 27)
473#define LPC24XX_PIN_EMC_BLS2 LPC24XX_PIN_EMC(4, 28)
474#define LPC24XX_PIN_EMC_BLS3 LPC24XX_PIN_EMC(4, 29)
475
476#define LPC24XX_PIN_EMC_D_0_15 LPC24XX_PIN_EMC_RANGE(3, 0, 15)
477#define LPC24XX_PIN_EMC_D_15_31 LPC24XX_PIN_EMC_RANGE(3, 15, 31)
478#define LPC24XX_PIN_EMC_D_0_31 LPC24XX_PIN_EMC_RANGE(3, 0, 31)
479
480#define LPC24XX_PIN_EMC_A_0_12 LPC24XX_PIN_EMC_RANGE(4, 0, 12)
481#define LPC24XX_PIN_EMC_A_0_13 LPC24XX_PIN_EMC_RANGE(4, 0, 13)
482#define LPC24XX_PIN_EMC_A_0_14 LPC24XX_PIN_EMC_RANGE(4, 0, 14)
483#define LPC24XX_PIN_EMC_A_0_15 LPC24XX_PIN_EMC_RANGE(4, 0, 15)
[4a6cc2a]484#define LPC24XX_PIN_EMC_A_0_16 \
485  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]486  LPC24XX_PIN_EMC(4, 16)
[4a6cc2a]487#define LPC24XX_PIN_EMC_A_0_17 \
488  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]489  LPC24XX_PIN_EMC_RANGE(4, 16, 17)
[4a6cc2a]490#define LPC24XX_PIN_EMC_A_0_18 \
491  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]492  LPC24XX_PIN_EMC_RANGE(4, 16, 18)
[4a6cc2a]493#define LPC24XX_PIN_EMC_A_0_19 \
494  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]495  LPC24XX_PIN_EMC_RANGE(4, 16, 19)
[4a6cc2a]496#define LPC24XX_PIN_EMC_A_0_20 \
497  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]498  LPC24XX_PIN_EMC_RANGE(4, 16, 20)
[4a6cc2a]499#define LPC24XX_PIN_EMC_A_0_21 \
500  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]501  LPC24XX_PIN_EMC_RANGE(4, 16, 21)
[4a6cc2a]502#define LPC24XX_PIN_EMC_A_0_22 \
503  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]504  LPC24XX_PIN_EMC_RANGE(4, 16, 22)
[4a6cc2a]505#define LPC24XX_PIN_EMC_A_0_23 \
506  LPC24XX_PIN_EMC_A_0_15, \
[50d8d32]507  LPC24XX_PIN_EMC_RANGE(4, 16, 23)
[4a6cc2a]508#define LPC24XX_PIN_EMC_A_0_24 \
509  LPC24XX_PIN_EMC_A_0_23, \
[50d8d32]510  LPC24XX_PIN_EMC(5, 24)
[4a6cc2a]511#define LPC24XX_PIN_EMC_A_0_25 \
512  LPC24XX_PIN_EMC_A_0_23, \
[50d8d32]513  LPC24XX_PIN_EMC_RANGE(5, 24, 25)
[d74ed4a]514
515/** @} */
516
517/**
518 * @name I2C 0 Pins
519 *
520 * @{
521 */
522
523#define LPC24XX_PIN_I2C_0_SDA \
[4a6cc2a]524  LPC24XX_PIN_WITH_TYPE(0, 27, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]525#define LPC24XX_PIN_I2C_0_SCL \
[4a6cc2a]526  LPC24XX_PIN_WITH_TYPE(0, 28, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]527
528/** @} */
529
530/**
531 * @name I2C 1 Pins
532 *
533 * @{
534 */
535
536#define LPC24XX_PIN_I2C_1_SDA_P0_0 \
[4a6cc2a]537  LPC24XX_PIN_WITH_TYPE(0, 0, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]538#define LPC24XX_PIN_I2C_1_SDA_P0_19 \
[4a6cc2a]539  LPC24XX_PIN_WITH_TYPE(0, 19, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]540#define LPC24XX_PIN_I2C_1_SDA_P2_14 \
[4a6cc2a]541  LPC24XX_PIN_WITH_TYPE(2, 14, LPC24XX_PIN_FUNCTION_11, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]542
543#define LPC24XX_PIN_I2C_1_SCL_P0_1 \
[4a6cc2a]544  LPC24XX_PIN_WITH_TYPE(0, 1, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_I2C)
545#define LPC24XX_PIN_I2C_1_SCL_P0_20 \
546  LPC24XX_PIN_WITH_TYPE(0, 20, LPC24XX_PIN_FUNCTION_11, 3, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]547#define LPC24XX_PIN_I2C_1_SCL_P2_15 \
[4a6cc2a]548  LPC24XX_PIN_WITH_TYPE(2, 15, LPC24XX_PIN_FUNCTION_11, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]549
550/** @} */
551
552/**
553 * @name I2C 2 Pins
554 *
555 * @{
556 */
557
558#define LPC24XX_PIN_I2C_2_SDA_P0_10 \
[4a6cc2a]559  LPC24XX_PIN_WITH_TYPE(0, 10, LPC24XX_PIN_FUNCTION_10, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]560#define LPC24XX_PIN_I2C_2_SDA_P2_30 \
[4a6cc2a]561  LPC24XX_PIN_WITH_TYPE(2, 30, LPC24XX_PIN_FUNCTION_11, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]562#define LPC24XX_PIN_I2C_2_SDA_P4_20 \
[4a6cc2a]563  LPC24XX_PIN_WITH_TYPE(4, 20, LPC24XX_PIN_FUNCTION_10, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]564
565#define LPC24XX_PIN_I2C_2_SCL_P0_11 \
[4a6cc2a]566  LPC24XX_PIN_WITH_TYPE(0, 11, LPC24XX_PIN_FUNCTION_10, 2, LPC17XX_PIN_TYPE_I2C)
567#define LPC24XX_PIN_I2C_2_SCL_P2_31 \
568  LPC24XX_PIN_WITH_TYPE(2, 31, LPC24XX_PIN_FUNCTION_11, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]569#define LPC24XX_PIN_I2C_2_SCL_P4_21 \
[4a6cc2a]570  LPC24XX_PIN_WITH_TYPE(4, 21, LPC24XX_PIN_FUNCTION_10, 2, LPC17XX_PIN_TYPE_I2C)
[d74ed4a]571
572/** @} */
573
574/**
575 * @name I2S Pins
576 *
577 * @{
578 */
579
580#define LPC24XX_PIN_I2S_RX_CLK_P0_4 \
[4a6cc2a]581  LPC24XX_PIN(0, 4, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]582#define LPC24XX_PIN_I2S_RX_CLK_P0_23 \
[4a6cc2a]583  LPC24XX_PIN(0, 23, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]584
585#define LPC24XX_PIN_I2S_RX_WS_P0_5 \
[4a6cc2a]586  LPC24XX_PIN(0, 5, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]587#define LPC24XX_PIN_I2S_RX_WS_P0_24 \
[4a6cc2a]588  LPC24XX_PIN(0, 24, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]589
590#define LPC24XX_PIN_I2S_RX_SDA_P0_6 \
[4a6cc2a]591  LPC24XX_PIN(0, 6, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]592#define LPC24XX_PIN_I2S_RX_SDA_P0_25 \
[4a6cc2a]593  LPC24XX_PIN(0, 25, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]594
595#define LPC24XX_PIN_I2S_TX_CLK_P0_7 \
[4a6cc2a]596  LPC24XX_PIN(0, 7, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]597#define LPC24XX_PIN_I2S_TX_CLK_P2_11 \
[4a6cc2a]598  LPC24XX_PIN(2, 11, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]599
600#define LPC24XX_PIN_I2S_TX_WS_P0_8 \
[4a6cc2a]601  LPC24XX_PIN(0, 8, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]602#define LPC24XX_PIN_I2S_TX_WS_P2_12 \
[4a6cc2a]603  LPC24XX_PIN(2, 12, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]604
605#define LPC24XX_PIN_I2S_TX_SDA_P0_9 \
[4a6cc2a]606  LPC24XX_PIN(0, 9, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]607#define LPC24XX_PIN_I2S_TX_SDA_P2_13 \
[4a6cc2a]608  LPC24XX_PIN(2, 13, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]609
610/** @} */
611
612/**
613 * @name LCD Pins
614 *
615 * @{
616 */
617
618#define LPC24XX_PIN_LCD_PWR \
[4a6cc2a]619  LPC24XX_PIN(2, 0, LPC24XX_PIN_FUNCTION_11, 7)
[d74ed4a]620#define LPC24XX_PIN_LCD_LE \
[4a6cc2a]621  LPC24XX_PIN(2, 1, LPC24XX_PIN_FUNCTION_11, 7)
[d74ed4a]622#define LPC24XX_PIN_LCD_DCLK \
[4a6cc2a]623  LPC24XX_PIN(2, 2, LPC24XX_PIN_FUNCTION_11, 7)
[d74ed4a]624#define LPC24XX_PIN_LCD_FP \
[4a6cc2a]625  LPC24XX_PIN(2, 3, LPC24XX_PIN_FUNCTION_11, 7)
[d74ed4a]626#define LPC24XX_PIN_LCD_ENAB_M \
[4a6cc2a]627  LPC24XX_PIN(2, 4, LPC24XX_PIN_FUNCTION_11, 7)
[d74ed4a]628#define LPC24XX_PIN_LCD_LP \
[4a6cc2a]629  LPC24XX_PIN(2, 5, LPC24XX_PIN_FUNCTION_11, 7)
[d74ed4a]630#define LPC24XX_PIN_LCD_CLKIN \
[4a6cc2a]631  LPC24XX_PIN(2, 11, LPC24XX_PIN_FUNCTION_01, 7)
632
633#define LPC24XX_PIN_LCD_VD_0_P0_4 \
634  LPC24XX_PIN(0, 4, LPC24XX_PIN_FUNCTION_01, 7)
635#define LPC24XX_PIN_LCD_VD_0_P2_6 \
636  LPC24XX_PIN(2, 6, LPC24XX_PIN_FUNCTION_11, 6)
637#define LPC24XX_PIN_LCD_VD_1_P0_5 \
638  LPC24XX_PIN(0, 5, LPC24XX_PIN_FUNCTION_01, 7)
639#define LPC24XX_PIN_LCD_VD_1_P2_7 \
640  LPC24XX_PIN(2, 7, LPC24XX_PIN_FUNCTION_11, 6)
641#define LPC24XX_PIN_LCD_VD_2_P2_8 \
642  LPC24XX_PIN(2, 8, LPC24XX_PIN_FUNCTION_11, 6)
643#define LPC24XX_PIN_LCD_VD_2_P4_28 \
644  LPC24XX_PIN(4, 28, LPC24XX_PIN_FUNCTION_10, 7)
645#define LPC24XX_PIN_LCD_VD_3_P2_9 \
646  LPC24XX_PIN(2, 9, LPC24XX_PIN_FUNCTION_11, 6)
647#define LPC24XX_PIN_LCD_VD_3_P2_12 \
648  LPC24XX_PIN(2, 12, LPC24XX_PIN_FUNCTION_01, 5)
649#define LPC24XX_PIN_LCD_VD_3_P4_29 \
650  LPC24XX_PIN(4, 29, LPC24XX_PIN_FUNCTION_10, 7)
651#define LPC24XX_PIN_LCD_VD_4_P2_6 \
652  LPC24XX_PIN(2, 6, LPC24XX_PIN_FUNCTION_11, 7)
653#define LPC24XX_PIN_LCD_VD_4_P2_12 \
654  LPC24XX_PIN(2, 12, LPC24XX_PIN_FUNCTION_01, 4)
655#define LPC24XX_PIN_LCD_VD_5_P2_7 \
656  LPC24XX_PIN(2, 7, LPC24XX_PIN_FUNCTION_11, 7)
657#define LPC24XX_PIN_LCD_VD_5_P2_13 \
658  LPC24XX_PIN(2, 13, LPC24XX_PIN_FUNCTION_01, 5)
659#define LPC24XX_PIN_LCD_VD_6_P1_20 \
660  LPC24XX_PIN(1, 20, LPC24XX_PIN_FUNCTION_01, 6)
661#define LPC24XX_PIN_LCD_VD_6_P2_8 \
662  LPC24XX_PIN(2, 8, LPC24XX_PIN_FUNCTION_11, 7)
663#define LPC24XX_PIN_LCD_VD_6_P4_28 \
664  LPC24XX_PIN(4, 28, LPC24XX_PIN_FUNCTION_10, 5)
665#define LPC24XX_PIN_LCD_VD_7_P1_21 \
666  LPC24XX_PIN(1, 21, LPC24XX_PIN_FUNCTION_01, 6)
667#define LPC24XX_PIN_LCD_VD_7_P2_9 \
668  LPC24XX_PIN(2, 9, LPC24XX_PIN_FUNCTION_11, 7)
669#define LPC24XX_PIN_LCD_VD_7_P4_29 \
670  LPC24XX_PIN(4, 29, LPC24XX_PIN_FUNCTION_10, 5)
671#define LPC24XX_PIN_LCD_VD_8_P0_6 \
672  LPC24XX_PIN(0, 6, LPC24XX_PIN_FUNCTION_01, 7)
673#define LPC24XX_PIN_LCD_VD_8_P1_22 \
674  LPC24XX_PIN(1, 22, LPC24XX_PIN_FUNCTION_01, 6)
675#define LPC24XX_PIN_LCD_VD_8_P2_12 \
676  LPC24XX_PIN(2, 12, LPC24XX_PIN_FUNCTION_01, 6)
677#define LPC24XX_PIN_LCD_VD_9_P0_7 \
678  LPC24XX_PIN(0, 7, LPC24XX_PIN_FUNCTION_01, 7)
679#define LPC24XX_PIN_LCD_VD_9_P1_23 \
680  LPC24XX_PIN(1, 23, LPC24XX_PIN_FUNCTION_01, 6)
681#define LPC24XX_PIN_LCD_VD_9_P2_13 \
682  LPC24XX_PIN(2, 13, LPC24XX_PIN_FUNCTION_01, 6)
683#define LPC24XX_PIN_LCD_VD_10_P1_20 \
684  LPC24XX_PIN(1, 20, LPC24XX_PIN_FUNCTION_01, 7)
685#define LPC24XX_PIN_LCD_VD_10_P1_24 \
686  LPC24XX_PIN(1, 24, LPC24XX_PIN_FUNCTION_01, 6)
687#define LPC24XX_PIN_LCD_VD_10_P4_28 \
688  LPC24XX_PIN(4, 28, LPC24XX_PIN_FUNCTION_10, 6)
689#define LPC24XX_PIN_LCD_VD_11_P1_21 \
690  LPC24XX_PIN(1, 21, LPC24XX_PIN_FUNCTION_01, 7)
691#define LPC24XX_PIN_LCD_VD_11_P1_25 \
692  LPC24XX_PIN(1, 25, LPC24XX_PIN_FUNCTION_01, 6)
693#define LPC24XX_PIN_LCD_VD_11_P4_29 \
694  LPC24XX_PIN(4, 29, LPC24XX_PIN_FUNCTION_10, 6)
695#define LPC24XX_PIN_LCD_VD_12_P1_22 \
696  LPC24XX_PIN(1, 22, LPC24XX_PIN_FUNCTION_01, 7)
697#define LPC24XX_PIN_LCD_VD_12_P1_26 \
698  LPC24XX_PIN(1, 26, LPC24XX_PIN_FUNCTION_01, 6)
699#define LPC24XX_PIN_LCD_VD_13_P1_23 \
700  LPC24XX_PIN(1, 23, LPC24XX_PIN_FUNCTION_01, 7)
701#define LPC24XX_PIN_LCD_VD_13_P1_27 \
702  LPC24XX_PIN(1, 27, LPC24XX_PIN_FUNCTION_01, 6)
703#define LPC24XX_PIN_LCD_VD_14_P1_24 \
704  LPC24XX_PIN(1, 24, LPC24XX_PIN_FUNCTION_01, 7)
705#define LPC24XX_PIN_LCD_VD_14_P1_28 \
706  LPC24XX_PIN(1, 28, LPC24XX_PIN_FUNCTION_01, 6)
707#define LPC24XX_PIN_LCD_VD_15_P1_25 \
708  LPC24XX_PIN(1, 25, LPC24XX_PIN_FUNCTION_01, 7)
709#define LPC24XX_PIN_LCD_VD_15_P1_29 \
710  LPC24XX_PIN(1, 29, LPC24XX_PIN_FUNCTION_01, 6)
711#define LPC24XX_PIN_LCD_VD_16_P0_8 \
712  LPC24XX_PIN(0, 8, LPC24XX_PIN_FUNCTION_01, 7)
713#define LPC24XX_PIN_LCD_VD_17_P0_9 \
714  LPC24XX_PIN(0, 9, LPC24XX_PIN_FUNCTION_01, 7)
715#define LPC24XX_PIN_LCD_VD_18_P2_12 \
716  LPC24XX_PIN(2, 12, LPC24XX_PIN_FUNCTION_01, 7)
717#define LPC24XX_PIN_LCD_VD_19_P2_13 \
718  LPC24XX_PIN(2, 13, LPC24XX_PIN_FUNCTION_01, 7)
719#define LPC24XX_PIN_LCD_VD_20_P1_26 \
720  LPC24XX_PIN(1, 26, LPC24XX_PIN_FUNCTION_01, 7)
721#define LPC24XX_PIN_LCD_VD_21_P1_27 \
722  LPC24XX_PIN(1, 27, LPC24XX_PIN_FUNCTION_01, 7)
723#define LPC24XX_PIN_LCD_VD_22_P1_28 \
724  LPC24XX_PIN(1, 28, LPC24XX_PIN_FUNCTION_01, 7)
725#define LPC24XX_PIN_LCD_VD_23_P1_29 \
726  LPC24XX_PIN(1, 29, LPC24XX_PIN_FUNCTION_01, 7)
[d74ed4a]727
728/** @} */
729
730/**
731 * @name PWM 0 Pins
732 *
733 * @{
734 */
735
736#define LPC24XX_PIN_PWM_0_CHANNEL_1_P1_2 \
[4a6cc2a]737  LPC24XX_PIN(1, 2, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]738#define LPC24XX_PIN_PWM_0_CHANNEL_1_P3_16 \
[4a6cc2a]739  LPC24XX_PIN(3, 16, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]740
741#define LPC24XX_PIN_PWM_0_CHANNEL_2_P1_3 \
[4a6cc2a]742  LPC24XX_PIN(1, 3, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]743#define LPC24XX_PIN_PWM_0_CHANNEL_2_P3_17 \
[4a6cc2a]744  LPC24XX_PIN(3, 17, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]745
746#define LPC24XX_PIN_PWM_0_CHANNEL_3_P1_5 \
[4a6cc2a]747  LPC24XX_PIN(1, 5, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]748#define LPC24XX_PIN_PWM_0_CHANNEL_3_P3_18 \
[4a6cc2a]749  LPC24XX_PIN(3, 18, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]750
751#define LPC24XX_PIN_PWM_0_CHANNEL_4_P1_6 \
[4a6cc2a]752  LPC24XX_PIN(1, 6, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]753#define LPC24XX_PIN_PWM_0_CHANNEL_4_P3_19 \
[4a6cc2a]754  LPC24XX_PIN(3, 19, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]755
756#define LPC24XX_PIN_PWM_0_CHANNEL_5_P1_7 \
[4a6cc2a]757  LPC24XX_PIN(1, 7, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]758#define LPC24XX_PIN_PWM_0_CHANNEL_5_P3_20 \
[4a6cc2a]759  LPC24XX_PIN(3, 20, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]760
761#define LPC24XX_PIN_PWM_0_CHANNEL_6_P1_11 \
[4a6cc2a]762  LPC24XX_PIN(1, 11, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]763#define LPC24XX_PIN_PWM_0_CHANNEL_6_P3_21 \
[4a6cc2a]764  LPC24XX_PIN(3, 21, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]765
766#define LPC24XX_PIN_PWM_0_CAPTURE_0_P1_12 \
[4a6cc2a]767  LPC24XX_PIN(1, 12, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]768#define LPC24XX_PIN_PWM_0_CAPTURE_0_P3_22 \
[4a6cc2a]769  LPC24XX_PIN(3, 22, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]770
771/** @} */
772
773/**
774 * @name PWM 1 Pins
775 *
776 * @{
777 */
778
779#define LPC24XX_PIN_PWM_1_CHANNEL_1_P1_18 \
[4a6cc2a]780  LPC24XX_PIN(1, 18, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]781#define LPC24XX_PIN_PWM_1_CHANNEL_1_P2_0 \
[4a6cc2a]782  LPC24XX_PIN(2, 0, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]783#define LPC24XX_PIN_PWM_1_CHANNEL_1_P3_24 \
[4a6cc2a]784  LPC24XX_PIN(3, 24, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]785
786#define LPC24XX_PIN_PWM_1_CHANNEL_2_P1_20 \
[4a6cc2a]787  LPC24XX_PIN(1, 20, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]788#define LPC24XX_PIN_PWM_1_CHANNEL_2_P2_1 \
[4a6cc2a]789  LPC24XX_PIN(2, 1, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]790#define LPC24XX_PIN_PWM_1_CHANNEL_2_P3_25 \
[4a6cc2a]791  LPC24XX_PIN(3, 25, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]792
793#define LPC24XX_PIN_PWM_1_CHANNEL_3_P1_21 \
[4a6cc2a]794  LPC24XX_PIN(1, 21, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]795#define LPC24XX_PIN_PWM_1_CHANNEL_3_P2_2 \
[4a6cc2a]796  LPC24XX_PIN(2, 2, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]797#define LPC24XX_PIN_PWM_1_CHANNEL_3_P3_26 \
[4a6cc2a]798  LPC24XX_PIN(3, 26, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]799
800#define LPC24XX_PIN_PWM_1_CHANNEL_4_P1_23 \
[4a6cc2a]801  LPC24XX_PIN(1, 23, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]802#define LPC24XX_PIN_PWM_1_CHANNEL_4_P2_3 \
[4a6cc2a]803  LPC24XX_PIN(2, 3, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]804#define LPC24XX_PIN_PWM_1_CHANNEL_4_P3_27 \
[4a6cc2a]805  LPC24XX_PIN(3, 27, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]806
807#define LPC24XX_PIN_PWM_1_CHANNEL_5_P1_24 \
[4a6cc2a]808  LPC24XX_PIN(1, 24, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]809#define LPC24XX_PIN_PWM_1_CHANNEL_5_P2_4 \
[4a6cc2a]810  LPC24XX_PIN(2, 4, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]811#define LPC24XX_PIN_PWM_1_CHANNEL_5_P3_28 \
[4a6cc2a]812  LPC24XX_PIN(3, 28, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]813
814#define LPC24XX_PIN_PWM_1_CHANNEL_6_P1_26 \
[4a6cc2a]815  LPC24XX_PIN(1, 26, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]816#define LPC24XX_PIN_PWM_1_CHANNEL_6_P2_5 \
[4a6cc2a]817  LPC24XX_PIN(2, 5, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]818#define LPC24XX_PIN_PWM_1_CHANNEL_6_P3_29 \
[4a6cc2a]819  LPC24XX_PIN(3, 29, LPC24XX_PIN_FUNCTIO9_11, 2)
[d74ed4a]820
821#define LPC24XX_PIN_PWM_1_CAPTURE_0_P1_28 \
[4a6cc2a]822  LPC24XX_PIN(1, 28, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]823#define LPC24XX_PIN_PWM_1_CAPTURE_0_P2_7 \
[4a6cc2a]824  LPC24XX_PIN(2, 6, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]825#define LPC24XX_PIN_PWM_1_CAPTURE_0_P3_23 \
[4a6cc2a]826  LPC24XX_PIN(3, 23, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]827
828#define LPC24XX_PIN_PWM_1_CAPTURE_1_P1_29 \
[4a6cc2a]829  LPC24XX_PIN(1, 29, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]830
831/** @} */
832
[14ee5a1e]833#ifdef ARM_MULTILIB_ARCH_V4
834
835/**
836 * @name SPI Pins
837 *
838 * @{
839 */
840
841#define LPC24XX_PIN_SPI_SCK \
842  LPC24XX_PIN(0, 15, LPC24XX_PIN_FUNCTION_11)
843#define LPC24XX_PIN_SPI_SSEL \
844  LPC24XX_PIN(0, 16, LPC24XX_PIN_FUNCTION_11)
845#define LPC24XX_PIN_SPI_MISO \
846  LPC24XX_PIN(0, 17, LPC24XX_PIN_FUNCTION_11)
847#define LPC24XX_PIN_SPI_MOSI \
848  LPC24XX_PIN(0, 18, LPC24XX_PIN_FUNCTION_11)
849
850/** @} */
851
852#endif /* ARM_MULTILIB_ARCH_V4 */
853
[d74ed4a]854/**
855 * @name SSP 0 Pins
856 *
857 * @{
858 */
859
860#define LPC24XX_PIN_SSP_0_SCK_P0_15 \
[4a6cc2a]861  LPC24XX_PIN(0, 15, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]862#define LPC24XX_PIN_SSP_0_SCK_P1_20 \
[4a6cc2a]863  LPC24XX_PIN(1, 20, LPC24XX_PIN_FUNCTION_11, 5)
[d74ed4a]864#define LPC24XX_PIN_SSP_0_SCK_P2_22 \
[4a6cc2a]865  LPC24XX_PIN(2, 22, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]866
867#define LPC24XX_PIN_SSP_0_SSEL_P0_16 \
[4a6cc2a]868  LPC24XX_PIN(0, 16, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]869#define LPC24XX_PIN_SSP_0_SSEL_P1_21 \
[4a6cc2a]870  LPC24XX_PIN(1, 21, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]871#define LPC24XX_PIN_SSP_0_SSEL_P2_23 \
[4a6cc2a]872  LPC24XX_PIN(2, 23, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]873
874#define LPC24XX_PIN_SSP_0_MISO_P0_17 \
[4a6cc2a]875  LPC24XX_PIN(0, 17, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]876#define LPC24XX_PIN_SSP_0_MISO_P1_23 \
[4a6cc2a]877  LPC24XX_PIN(1, 23, LPC24XX_PIN_FUNCTION_11, 5)
[d74ed4a]878#define LPC24XX_PIN_SSP_0_MISO_P2_26 \
[4a6cc2a]879  LPC24XX_PIN(2, 26, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]880
881#define LPC24XX_PIN_SSP_0_MOSI_P0_18 \
[4a6cc2a]882  LPC24XX_PIN(0, 18, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]883#define LPC24XX_PIN_SSP_0_MOSI_P1_24 \
[4a6cc2a]884  LPC24XX_PIN(1, 24, LPC24XX_PIN_FUNCTION_11, 5)
[d74ed4a]885#define LPC24XX_PIN_SSP_0_MOSI_P2_27 \
[4a6cc2a]886  LPC24XX_PIN(2, 27, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]887
888/** @} */
889
890/**
891 * @name SSP 1 Pins
892 *
893 * @{
894 */
895
896#define LPC24XX_PIN_SSP_1_SCK_P0_6 \
[4a6cc2a]897  LPC24XX_PIN(0, 7, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]898#define LPC24XX_PIN_SSP_1_SCK_P0_12 \
[4a6cc2a]899  LPC24XX_PIN(1, 31, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]900#define LPC24XX_PIN_SSP_1_SCK_P4_20 \
[4a6cc2a]901  LPC24XX_PIN(4, 20, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]902
903#define LPC24XX_PIN_SSP_1_SSEL_P0_7 \
[4a6cc2a]904  LPC24XX_PIN(0, 6, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]905#define LPC24XX_PIN_SSP_1_SSEL_P0_13 \
[4a6cc2a]906  LPC24XX_PIN(0, 14, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]907#define LPC24XX_PIN_SSP_1_SSEL_P4_21 \
[4a6cc2a]908  LPC24XX_PIN(4, 21, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]909
910#define LPC24XX_PIN_SSP_1_MISO_P0_8 \
[4a6cc2a]911  LPC24XX_PIN(0, 8, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]912#define LPC24XX_PIN_SSP_1_MISO_P0_14 \
[4a6cc2a]913  LPC24XX_PIN(0, 12, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]914#define LPC24XX_PIN_SSP_1_MISO_P4_22 \
[4a6cc2a]915  LPC24XX_PIN(4, 22, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]916
917#define LPC24XX_PIN_SSP_1_MOSI_P0_9 \
[4a6cc2a]918  LPC24XX_PIN(0, 9, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]919#define LPC24XX_PIN_SSP_1_MOSI_P1_31 \
[4a6cc2a]920  LPC24XX_PIN(0, 13, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]921#define LPC24XX_PIN_SSP_1_MOSI_P4_23 \
[4a6cc2a]922  LPC24XX_PIN(4, 23, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]923
924/** @} */
925
[14ee5a1e]926#ifdef ARM_MULTILIB_ARCH_V7M
927
928/**
929 * @name SSP 2 Pins
930 *
931 * @{
932 */
933
934#define LPC24XX_PIN_SSP_2_SCK_P1_0 \
935  LPC24XX_PIN(1, 0, LPC24XX_PIN_FUNCTION_00, 4)
[b2eaa6c6]936#define LPC24XX_PIN_SSP_2_SCK_P5_2 \
937  LPC24XX_PIN(5, 2, LPC24XX_PIN_FUNCTION_00, 2)
[14ee5a1e]938
939#define LPC24XX_PIN_SSP_2_SSEL_P1_8 \
940  LPC24XX_PIN(1, 8, LPC24XX_PIN_FUNCTION_00, 4)
[b2eaa6c6]941#define LPC24XX_PIN_SSP_2_SSEL_P5_3 \
942  LPC24XX_PIN(5, 3, LPC24XX_PIN_FUNCTION_00, 2)
[14ee5a1e]943
944#define LPC24XX_PIN_SSP_2_MISO_P1_4 \
945  LPC24XX_PIN(1, 4, LPC24XX_PIN_FUNCTION_00, 4)
[b2eaa6c6]946#define LPC24XX_PIN_SSP_2_MISO_P5_1 \
947  LPC24XX_PIN(5, 1, LPC24XX_PIN_FUNCTION_00, 2)
[14ee5a1e]948
949#define LPC24XX_PIN_SSP_2_MOSI_P1_1 \
950  LPC24XX_PIN(1, 1, LPC24XX_PIN_FUNCTION_00, 4)
[b2eaa6c6]951#define LPC24XX_PIN_SSP_2_MOSI_P5_0 \
952  LPC24XX_PIN(5, 0, LPC24XX_PIN_FUNCTION_00, 2)
[14ee5a1e]953
954/** @} */
955
956#endif /* ARM_MULTILIB_ARCH_V7M */
957
[d74ed4a]958/**
959 * @name UART 0 Pins
960 *
961 * @{
962 */
963
964#define LPC24XX_PIN_UART_0_TXD \
[4a6cc2a]965  LPC24XX_PIN(0, 2, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]966
967#define LPC24XX_PIN_UART_0_RXD \
[4a6cc2a]968  LPC24XX_PIN(0, 3, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]969
970/** @} */
971
972/**
973 * @name UART 1 Pins
974 *
975 * @{
976 */
977
978#define LPC24XX_PIN_UART_1_TXD_P0_15 \
[4a6cc2a]979  LPC24XX_PIN(0, 15, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]980#define LPC24XX_PIN_UART_1_TXD_P2_0 \
[4a6cc2a]981  LPC24XX_PIN(2, 0, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]982#define LPC24XX_PIN_UART_1_TXD_P3_16 \
[4a6cc2a]983  LPC24XX_PIN(3, 16, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]984
985#define LPC24XX_PIN_UART_1_RXD_P0_16 \
[4a6cc2a]986  LPC24XX_PIN(0, 16, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]987#define LPC24XX_PIN_UART_1_RXD_P2_1 \
[4a6cc2a]988  LPC24XX_PIN(2, 1, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]989#define LPC24XX_PIN_UART_1_RXD_P3_17 \
[4a6cc2a]990  LPC24XX_PIN(3, 17, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]991
992/** @} */
993
994/**
995 * @name UART 2 Pins
996 *
997 * @{
998 */
999
1000#define LPC24XX_PIN_UART_2_TXD_P0_10 \
[4a6cc2a]1001  LPC24XX_PIN(0, 10, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1002#define LPC24XX_PIN_UART_2_TXD_P2_8 \
[4a6cc2a]1003  LPC24XX_PIN(2, 8, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1004#define LPC24XX_PIN_UART_2_TXD_P4_22 \
[4a6cc2a]1005  LPC24XX_PIN(4, 22, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1006
1007#define LPC24XX_PIN_UART_2_RXD_P0_11 \
[4a6cc2a]1008  LPC24XX_PIN(0, 11, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1009#define LPC24XX_PIN_UART_2_RXD_P2_9 \
[4a6cc2a]1010  LPC24XX_PIN(2, 9, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1011#define LPC24XX_PIN_UART_2_RXD_P4_23 \
[4a6cc2a]1012  LPC24XX_PIN(4, 23, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1013
1014/** @} */
1015
1016/**
1017 * @name UART 3 Pins
1018 *
1019 * @{
1020 */
1021
1022#define LPC24XX_PIN_UART_3_TXD_P0_0 \
[4a6cc2a]1023  LPC24XX_PIN(0, 0, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1024#define LPC24XX_PIN_UART_3_TXD_P0_25 \
[4a6cc2a]1025  LPC24XX_PIN(0, 25, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]1026#define LPC24XX_PIN_UART_3_TXD_P4_28 \
[4a6cc2a]1027  LPC24XX_PIN(4, 28, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]1028
1029#define LPC24XX_PIN_UART_3_RXD_P0_1 \
[4a6cc2a]1030  LPC24XX_PIN(0, 1, LPC24XX_PIN_FUNCTION_10, 2)
[c24d9823]1031#define LPC24XX_PIN_UART_3_RXD_P0_26 \
[4a6cc2a]1032  LPC24XX_PIN(0, 26, LPC24XX_PIN_FUNCTION_11, 3)
[d74ed4a]1033#define LPC24XX_PIN_UART_3_RXD_P4_29 \
[4a6cc2a]1034  LPC24XX_PIN(4, 29, LPC24XX_PIN_FUNCTION_11, 2)
[d74ed4a]1035
1036/** @} */
1037
[14ee5a1e]1038#ifdef ARM_MULTILIB_ARCH_V7M
1039
1040/**
1041 * @name UART 4 Pins
1042 *
1043 * @{
1044 */
1045
1046#define LPC24XX_PIN_UART_4_TXD_P0_22 \
1047  LPC24XX_PIN(0, 22, LPC24XX_PIN_FUNCTION_00, 3)
1048#define LPC24XX_PIN_UART_4_TXD_P1_29 \
1049  LPC24XX_PIN(1, 29, LPC24XX_PIN_FUNCTION_00, 5)
1050#define LPC24XX_PIN_UART_4_TXD_P5_4 \
1051  LPC24XX_PIN(5, 4, LPC24XX_PIN_FUNCTION_00, 4)
1052
1053#define LPC24XX_PIN_UART_4_RXD_P2_9 \
1054  LPC24XX_PIN(2, 9, LPC24XX_PIN_FUNCTION_00, 3)
1055#define LPC24XX_PIN_UART_4_RXD_P5_3 \
1056  LPC24XX_PIN(5, 3, LPC24XX_PIN_FUNCTION_00, 4)
1057
1058#define LPC24XX_PIN_UART_4_OE_P0_21 \
1059  LPC24XX_PIN(0, 21, LPC24XX_PIN_FUNCTION_00, 3)
1060
1061#define LPC24XX_PIN_UART_4_SCLK_P0_21 \
1062  LPC24XX_PIN(0, 21, LPC24XX_PIN_FUNCTION_00, 5)
1063
1064#endif /* ARM_MULTILIB_ARCH_V7M */
1065
1066/** @} */
1067
[d74ed4a]1068/**
1069 * @name USB Port 1 Pins
1070 *
1071 * @{
1072 */
1073
1074#define LPC24XX_PIN_USB_D_PLUS_1\
[4a6cc2a]1075  LPC24XX_PIN(0, 29, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1076#define LPC24XX_PIN_USB_D_MINUS_1\
[4a6cc2a]1077  LPC24XX_PIN(0, 30, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1078#define LPC24XX_PIN_USB_UP_LED_1\
[4a6cc2a]1079  LPC24XX_PIN(1, 18, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1080#define LPC24XX_PIN_USB_TX_E_1\
[4a6cc2a]1081  LPC24XX_PIN(1, 19, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1082#define LPC24XX_PIN_USB_PPWR_1\
[4a6cc2a]1083  LPC24XX_PIN(1, 19, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1084#define LPC24XX_PIN_USB_TX_DP_1\
[4a6cc2a]1085  LPC24XX_PIN(1, 20, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1086#define LPC24XX_PIN_USB_TX_DM_1\
[4a6cc2a]1087  LPC24XX_PIN(1, 21, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1088#define LPC24XX_PIN_USB_RCV_1\
[4a6cc2a]1089  LPC24XX_PIN(1, 22, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1090#define LPC24XX_PIN_USB_PWRD_1\
[4a6cc2a]1091  LPC24XX_PIN(1, 22, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1092#define LPC24XX_PIN_USB_RX_DP_1\
[4a6cc2a]1093  LPC24XX_PIN(1, 23, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1094#define LPC24XX_PIN_USB_RX_DM_1\
[4a6cc2a]1095  LPC24XX_PIN(1, 24, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1096#define LPC24XX_PIN_USB_LS_1\
[4a6cc2a]1097  LPC24XX_PIN(1, 25, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1098#define LPC24XX_PIN_USB_HSTEN_1\
[4a6cc2a]1099  LPC24XX_PIN(1, 25, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1100#define LPC24XX_PIN_USB_SSPND_1\
[4a6cc2a]1101  LPC24XX_PIN(1, 26, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1102#define LPC24XX_PIN_USB_INT_1\
[4a6cc2a]1103  LPC24XX_PIN(1, 27, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1104#define LPC24XX_PIN_USB_OVRCR_1\
[4a6cc2a]1105  LPC24XX_PIN(1, 27, LPC24XX_PIN_FUNCTION_10, 2)
[d74ed4a]1106#define LPC24XX_PIN_USB_SCL_1\
[4a6cc2a]1107  LPC24XX_PIN(1, 28, LPC24XX_PIN_FUNCTION_01, 1)
[e9e5b92d]1108#define LPC24XX_PIN_USB_SDA_1 \
1109  LPC24XX_PIN_WITH_TYPE( \
1110    1, 29, LPC24XX_PIN_FUNCTION_01, 1, LPC17XX_PIN_TYPE_OPEN_DRAIN \
1111  )
[d74ed4a]1112#define LPC24XX_PIN_USB_CONNECT_1\
[4a6cc2a]1113  LPC24XX_PIN(2, 9, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1114
1115/** @} */
1116
1117/**
1118 * @name USB Port 2 Pins
1119 *
1120 * @{
1121 */
1122
1123#define LPC24XX_PIN_USB_PPWR_2\
[4a6cc2a]1124  LPC24XX_PIN(0, 12, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1125#define LPC24XX_PIN_USB_UP_LED_2\
[4a6cc2a]1126  LPC24XX_PIN(0, 13, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1127#define LPC24XX_PIN_USB_HSTEN_2\
[4a6cc2a]1128  LPC24XX_PIN(0, 14, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1129#define LPC24XX_PIN_USB_CONNECT_2\
[4a6cc2a]1130  LPC24XX_PIN(0, 14, LPC24XX_PIN_FUNCTION_01, 3)
[d74ed4a]1131#define LPC24XX_PIN_USB_D_PLUS_2\
[4a6cc2a]1132  LPC24XX_PIN(0, 31, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1133#define LPC24XX_PIN_USB_PWRD_2\
[4a6cc2a]1134  LPC24XX_PIN(1, 30, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1135#define LPC24XX_PIN_USB_OVRCR_2\
[4a6cc2a]1136  LPC24XX_PIN(1, 31, LPC24XX_PIN_FUNCTION_01, 1)
[d74ed4a]1137
1138/** @} */
1139
[ba938b8d]1140/** @} */
1141
[9364cf66]1142#ifdef __cplusplus
1143}
1144#endif /* __cplusplus */
1145
1146#endif /* LIBBSP_ARM_LPC24XX_IO_H */
Note: See TracBrowser for help on using the repository browser.