Mouse code for the MacroRat
mbed-dev/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_UBLOX_EVA_NINA/PinNames.h@18:6a4db94011d3, 2017-05-14 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sun May 14 23:18:57 2017 +0000
- Revision:
- 18:6a4db94011d3
Publishing again
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | #ifndef MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 2 | #define MBED_PINNAMES_H |
sahilmgandhi | 18:6a4db94011d3 | 3 | |
sahilmgandhi | 18:6a4db94011d3 | 4 | #include "cmsis.h" |
sahilmgandhi | 18:6a4db94011d3 | 5 | |
sahilmgandhi | 18:6a4db94011d3 | 6 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 7 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 8 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 9 | |
sahilmgandhi | 18:6a4db94011d3 | 10 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 11 | PIN_INPUT, |
sahilmgandhi | 18:6a4db94011d3 | 12 | PIN_OUTPUT |
sahilmgandhi | 18:6a4db94011d3 | 13 | } PinDirection; |
sahilmgandhi | 18:6a4db94011d3 | 14 | |
sahilmgandhi | 18:6a4db94011d3 | 15 | #define PORT_SHIFT 3 |
sahilmgandhi | 18:6a4db94011d3 | 16 | |
sahilmgandhi | 18:6a4db94011d3 | 17 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 18 | // nRF52 pin names |
sahilmgandhi | 18:6a4db94011d3 | 19 | p0 = 0, |
sahilmgandhi | 18:6a4db94011d3 | 20 | p1 = 1, |
sahilmgandhi | 18:6a4db94011d3 | 21 | p2 = 2, |
sahilmgandhi | 18:6a4db94011d3 | 22 | p3 = 3, |
sahilmgandhi | 18:6a4db94011d3 | 23 | p4 = 4, |
sahilmgandhi | 18:6a4db94011d3 | 24 | p5 = 5, |
sahilmgandhi | 18:6a4db94011d3 | 25 | p6 = 6, |
sahilmgandhi | 18:6a4db94011d3 | 26 | p7 = 7, |
sahilmgandhi | 18:6a4db94011d3 | 27 | p8 = 8, |
sahilmgandhi | 18:6a4db94011d3 | 28 | p9 = 9, |
sahilmgandhi | 18:6a4db94011d3 | 29 | p10 = 10, |
sahilmgandhi | 18:6a4db94011d3 | 30 | p11 = 11, |
sahilmgandhi | 18:6a4db94011d3 | 31 | p12 = 12, |
sahilmgandhi | 18:6a4db94011d3 | 32 | p13 = 13, |
sahilmgandhi | 18:6a4db94011d3 | 33 | p14 = 14, |
sahilmgandhi | 18:6a4db94011d3 | 34 | p15 = 15, |
sahilmgandhi | 18:6a4db94011d3 | 35 | p16 = 16, |
sahilmgandhi | 18:6a4db94011d3 | 36 | p17 = 17, |
sahilmgandhi | 18:6a4db94011d3 | 37 | p18 = 18, |
sahilmgandhi | 18:6a4db94011d3 | 38 | p19 = 19, |
sahilmgandhi | 18:6a4db94011d3 | 39 | p20 = 20, |
sahilmgandhi | 18:6a4db94011d3 | 40 | p21 = 21, |
sahilmgandhi | 18:6a4db94011d3 | 41 | p22 = 22, |
sahilmgandhi | 18:6a4db94011d3 | 42 | p23 = 23, |
sahilmgandhi | 18:6a4db94011d3 | 43 | p24 = 24, |
sahilmgandhi | 18:6a4db94011d3 | 44 | p25 = 25, |
sahilmgandhi | 18:6a4db94011d3 | 45 | p26 = 26, |
sahilmgandhi | 18:6a4db94011d3 | 46 | p27 = 27, |
sahilmgandhi | 18:6a4db94011d3 | 47 | p28 = 28, |
sahilmgandhi | 18:6a4db94011d3 | 48 | p29 = 29, |
sahilmgandhi | 18:6a4db94011d3 | 49 | p30 = 30, |
sahilmgandhi | 18:6a4db94011d3 | 50 | p31 = 31, |
sahilmgandhi | 18:6a4db94011d3 | 51 | NC = (int)0xFFFFFFFF, // Not connected |
sahilmgandhi | 18:6a4db94011d3 | 52 | |
sahilmgandhi | 18:6a4db94011d3 | 53 | //NINA-B1 module pin names |
sahilmgandhi | 18:6a4db94011d3 | 54 | NINA_B1_GPIO_1 = p8, |
sahilmgandhi | 18:6a4db94011d3 | 55 | NINA_B1_GPIO_2 = p11, |
sahilmgandhi | 18:6a4db94011d3 | 56 | NINA_B1_GPIO_3 = p12, |
sahilmgandhi | 18:6a4db94011d3 | 57 | NINA_B1_GPIO_4 = p13, |
sahilmgandhi | 18:6a4db94011d3 | 58 | NINA_B1_GPIO_5 = p14, |
sahilmgandhi | 18:6a4db94011d3 | 59 | NINA_B1_GPIO_7 = p16, |
sahilmgandhi | 18:6a4db94011d3 | 60 | NINA_B1_GPIO_8 = p18, |
sahilmgandhi | 18:6a4db94011d3 | 61 | |
sahilmgandhi | 18:6a4db94011d3 | 62 | NINA_B1_GPIO_16 = p28, |
sahilmgandhi | 18:6a4db94011d3 | 63 | NINA_B1_GPIO_17 = p29, |
sahilmgandhi | 18:6a4db94011d3 | 64 | NINA_B1_GPIO_18 = p30, |
sahilmgandhi | 18:6a4db94011d3 | 65 | |
sahilmgandhi | 18:6a4db94011d3 | 66 | NINA_B1_GPIO_20 = p31, |
sahilmgandhi | 18:6a4db94011d3 | 67 | NINA_B1_GPIO_21 = p7, |
sahilmgandhi | 18:6a4db94011d3 | 68 | NINA_B1_GPIO_22 = p6, |
sahilmgandhi | 18:6a4db94011d3 | 69 | NINA_B1_GPIO_23 = p5, |
sahilmgandhi | 18:6a4db94011d3 | 70 | NINA_B1_GPIO_24 = p2, |
sahilmgandhi | 18:6a4db94011d3 | 71 | NINA_B1_GPIO_25 = p3, |
sahilmgandhi | 18:6a4db94011d3 | 72 | NINA_B1_GPIO_27 = p4, |
sahilmgandhi | 18:6a4db94011d3 | 73 | NINA_B1_GPIO_28 = p9, |
sahilmgandhi | 18:6a4db94011d3 | 74 | NINA_B1_GPIO_29 = p10, |
sahilmgandhi | 18:6a4db94011d3 | 75 | |
sahilmgandhi | 18:6a4db94011d3 | 76 | // Board pins |
sahilmgandhi | 18:6a4db94011d3 | 77 | LED1 = NINA_B1_GPIO_7, // ORANGE |
sahilmgandhi | 18:6a4db94011d3 | 78 | LED2 = NC, |
sahilmgandhi | 18:6a4db94011d3 | 79 | LED3 = NC, |
sahilmgandhi | 18:6a4db94011d3 | 80 | LED4 = NC, |
sahilmgandhi | 18:6a4db94011d3 | 81 | |
sahilmgandhi | 18:6a4db94011d3 | 82 | // Nordic SDK pin names |
sahilmgandhi | 18:6a4db94011d3 | 83 | RX_PIN_NUMBER = p5, |
sahilmgandhi | 18:6a4db94011d3 | 84 | TX_PIN_NUMBER = p6, |
sahilmgandhi | 18:6a4db94011d3 | 85 | CTS_PIN_NUMBER = p7, |
sahilmgandhi | 18:6a4db94011d3 | 86 | RTS_PIN_NUMBER = p31, |
sahilmgandhi | 18:6a4db94011d3 | 87 | I2C_SDA0 = p2, |
sahilmgandhi | 18:6a4db94011d3 | 88 | I2C_SCL0 = p3, |
sahilmgandhi | 18:6a4db94011d3 | 89 | |
sahilmgandhi | 18:6a4db94011d3 | 90 | // mBed interface pins |
sahilmgandhi | 18:6a4db94011d3 | 91 | USBTX = TX_PIN_NUMBER, |
sahilmgandhi | 18:6a4db94011d3 | 92 | USBRX = RX_PIN_NUMBER |
sahilmgandhi | 18:6a4db94011d3 | 93 | } PinName; |
sahilmgandhi | 18:6a4db94011d3 | 94 | |
sahilmgandhi | 18:6a4db94011d3 | 95 | typedef enum { |
sahilmgandhi | 18:6a4db94011d3 | 96 | PullNone = 0, |
sahilmgandhi | 18:6a4db94011d3 | 97 | PullDown = 1, |
sahilmgandhi | 18:6a4db94011d3 | 98 | PullUp = 3, |
sahilmgandhi | 18:6a4db94011d3 | 99 | PullDefault = PullUp |
sahilmgandhi | 18:6a4db94011d3 | 100 | } PinMode; |
sahilmgandhi | 18:6a4db94011d3 | 101 | |
sahilmgandhi | 18:6a4db94011d3 | 102 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 103 | } |
sahilmgandhi | 18:6a4db94011d3 | 104 | |
sahilmgandhi | 18:6a4db94011d3 | 105 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 106 | #endif |