Lines Matching defs:PIN
46 #define PIN(_num, _name, _caps) \
52 PIN( 0, "POWER", GPIO_PIN_INPUT),
53 PIN( 1, "SHUTDOWN", GPIO_PIN_OUTPUT),
54 PIN( 2, "FAN", GPIO_PIN_OUTPUT),
55 PIN( 3, "DC_DC", GPIO_PIN_OUTPUT),
56 PIN( 4, "DI_SPIN", GPIO_PIN_OUTPUT),
57 PIN( 5, "SLOT_LED", GPIO_PIN_OUTPUT),
58 PIN( 6, "EJECT_BTN", GPIO_PIN_INPUT),
59 PIN( 7, "SLOT_IN", GPIO_PIN_INPUT),
60 PIN( 8, "SENSOR_BAR", GPIO_PIN_OUTPUT),
61 PIN( 9, "DO_EJECT", GPIO_PIN_OUTPUT),
62 PIN(10, "EEP_CS", GPIO_PIN_OUTPUT),
63 PIN(11, "EEP_CLK", GPIO_PIN_OUTPUT),
64 PIN(12, "EEP_MOSI", GPIO_PIN_OUTPUT),
65 PIN(13, "EEP_MISO", GPIO_PIN_INPUT),
66 PIN(14, "AVE_SCL", GPIO_PIN_OUTPUT),
67 PIN(15, "AVE_SDA", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
68 PIN(16, "DEBUG0", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
69 PIN(17, "DEBUG1", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
70 PIN(18, "DEBUG2", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
71 PIN(19, "DEBUG3", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
72 PIN(20, "DEBUG4", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
73 PIN(21, "DEBUG5", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
74 PIN(22, "DEBUG6", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
75 PIN(23, "DEBUG7", GPIO_PIN_INPUT | GPIO_PIN_OUTPUT),
77 #undef PIN
87 hwgpio_pin_read(void *priv, int pin)
89 return (RD4(HW_GPIOB_IN) & __BIT(pin)) != 0;
93 hwgpio_pin_write(void *priv, int pin, int value)
101 out |= __BIT(pin);
103 out &= ~__BIT(pin);
110 hwgpio_pin_ctl(void *priv, int pin, int flags)
118 dir |= __BIT(pin);
120 dir &= ~__BIT(pin);