28 #if PROBE_ENABLE && !defined(PROBE_PIN)
29 #error "Probe input is not supported in this configuration!"
32 #if SAFETY_DOOR_ENABLE && !defined(SAFETY_DOOR_PIN)
33 #error "Safety door input is not supported in this configuration!"
36 #if MOTOR_FAULT_ENABLE && !defined(MOTOR_FAULT_PIN)
37 #error "Motor fault input is not supported in this configuration!"
40 #if MOTOR_WARNING_ENABLE && !defined(MOTOR_WARNING_PIN)
41 #error "Motor warning input is not supported in this configuration!"
44 #if I2C_STROBE_ENABLE && !defined(I2C_STROBE_PIN)
45 #error "I2C keypad/strobe is not supported in this configuration!"
48 #if MPG_ENABLE == 1 && !defined(MPG_MODE_PIN)
49 #error "MPG mode input is not supported in this configuration!"
52 #if QEI_SELECT_ENABLE && !defined(QEI_SELECT_PIN)
53 #error "Encoder select input is not supported in this configuration!"
56 #define EXPANDER_PORT 1
64 #define RESET_PORT CONTROL_PORT
66 #ifndef FEED_HOLD_PORT
67 #define FEED_HOLD_PORT CONTROL_PORT
69 #ifndef CYCLE_START_PORT
70 #define CYCLE_START_PORT CONTROL_PORT
73 #define ESTOP_PORT CONTROL_PORT
75 #ifndef PROBE_DISCONNECT_PORT
76 #define PROBE_DISCONNECT_PORT CONTROL_PORT
78 #ifndef STOP_DISABLE_PORT
79 #define STOP_DISABLE_PORT CONTROL_PORT
81 #ifndef BLOCK_DELETE_PORT
82 #define BLOCK_DELETE_PORT CONTROL_PORT
84 #ifndef SINGLE_BLOCK_PORT
85 #define SINGLE_BLOCK_PORT CONTROL_PORT
87 #ifndef MOTOR_FAULT_PORT
88 #define MOTOR_FAULT_PORT CONTROL_PORT
90 #ifndef MOTOR_WARNING_PORT
91 #define MOTOR_WARNING_PORT CONTROL_PORT
93 #ifndef LIMITS_OVERRIDE_PORT
94 #define LIMITS_OVERRIDE_PORT CONTROL_PORT
96 #if SAFETY_DOOR_ENABLE && !defined(SAFETY_DOOR_PORT)
97 #define SAFETY_DOOR_PORT CONTROL_PORT
102 #ifndef SD_DETECT_BIT
104 #define SD_DETECT_BIT (1<<SD_DETECT_PIN)
106 #define SD_DETECT_BIT 0
110 #ifndef CONTROL_ENABLE
111 #define CONTROL_ENABLE 0
114 #define a_cap(pin) .cap.pin
116 #if defined(ESP_PLATFORM) || defined(RP2040) || defined(__IMXRT1062__)
117 #define add_aux_input(fn, aux, irq, signal_bit) { .function = fn, .irq_mode = irq, .signal.value = signal_bit, .port = IOPORT_UNASSIGNED, .gpio.pin = aux##_PIN },
119 #define add_aux_input(fn, aux, irq, signal_bit) { .function = fn, .irq_mode = irq, .signal.value = signal_bit, .port = IOPORT_UNASSIGNED, .gpio.port = (void *)aux##_PORT, .gpio.pin = aux##_PIN },
121 #if defined(__IMXRT1062__) || defined(ESP_PLATFORM)
122 #define add_aux_output(fn, aux) { .function = fn, .port = IOPORT_UNASSIGNED, .gpio.pin = aux##_PIN },
124 #define add_aux_output(fn, aux) { .function = fn, .port = IOPORT_UNASSIGNED, .gpio.port = (void *)aux##_PORT, .gpio.pin = aux##_PIN },
126 #define add_aux_input_scan(fn, irq, signal_bit) { .function = fn, .irq_mode = irq, .signal.value = signal_bit, .port = IOPORT_UNASSIGNED, .gpio.pin = 0xFF, .scan = On },
127 #define add_aux_input_no_signal(fn, irq) { .function = fn, .irq_mode = irq, .port = IOPORT_UNASSIGNED, .gpio.pin = 0xFE },
128 #define add_aux_output_exp(fn, aux) { .function = fn, .port = IOPORT_UNASSIGNED, .gpio.port = (void *)aux##_PORT, .gpio.pin = aux##_PIN },
133 #if (CONTROL_ENABLE & CONTROL_ESTOP)
135 #elif (CONTROL_ENABLE & CONTROL_RESET)
139 #if (CONTROL_ENABLE & CONTROL_FEED_HOLD) && defined(FEED_HOLD_PIN)
142 #if (CONTROL_ENABLE & CONTROL_CYCLE_START) && defined(CYCLE_START_PIN)
145 #if SAFETY_DOOR_ENABLE && defined(SAFETY_DOOR_PIN)
148 #if MOTOR_FAULT_ENABLE && defined(MOTOR_FAULT_PIN)
151 #if MOTOR_WARNING_ENABLE && defined(MOTOR_WARNING_PIN)
154 #if I2C_STROBE_ENABLE && defined(I2C_STROBE_PIN)
157 #if MPG_ENABLE == 1 && defined(MPG_MODE_PIN)
160 #if QEI_SELECT_ENABLE && defined(QEI_SELECT_PIN)
164 #if PROBE_ENABLE && defined(PROBE_PIN)
167 #if PROBE2_ENABLE && defined(PROBE2_PIN)
170 #if TOOLSETTER_ENABLE && defined(TOOLSETTER_PIN)
175 #if TOOLSETTER_ENABLE && !defined(TOOLSETTER_PIN)
178 #if PROBE2_ENABLE && !defined(PROBE2_PIN)
181 #if TLS_OVERTRAVEL_ENABLE
184 #if LIMITS_OVERRIDE_ENABLE
187 #if STOP_DISABLE_ENABLE
190 #if BLOCK_DELETE_ENABLE
193 #if SINGLE_BLOCK_ENABLE
196 #if PROBE_DISCONNECT_ENABLE
206 #ifdef STM32_PLATFORM
214 for(idx = 0; ctrl_pin == NULL && aux_ctrl[idx].
gpio.
pin != 0xFF && idx <
sizeof(aux_ctrl) /
sizeof(
aux_ctrl_t); idx++) {
215 if(aux_ctrl[idx].gpio.
pin == gpio.
pin && aux_ctrl[idx].gpio.port == gpio.
port)
216 ctrl_pin = &aux_ctrl[idx];
249 for(idx = 0; ctrl_pin == NULL && idx <
sizeof(aux_ctrl) /
sizeof(
aux_ctrl_t) && aux_ctrl[idx].
gpio.
pin != 0xFF; idx++) {
250 if(aux_ctrl[idx].gpio.
pin == gpio.
pin && aux_ctrl[idx].gpio.port == gpio.
port) {
251 ctrl_pin = &aux_ctrl[idx];
252 ctrl_pin->
port = port;
253 ctrl_pin->
input = input;
262 static inline aux_ctrl_t *aux_ctrl_in_get (uint8_t port)
266 uint_fast8_t idx =
sizeof(aux_ctrl) /
sizeof(
aux_ctrl_t);
269 if(aux_ctrl[--idx].port == port)
270 ctrl_pin = &aux_ctrl[idx];
271 }
while(idx && ctrl_pin == NULL);
278 uint_fast8_t idx =
sizeof(aux_ctrl) /
sizeof(
aux_ctrl_t);
281 if(aux_ctrl[--idx].port != 0xFF && aux_ctrl[idx].irq_mode !=
IRQ_Mode_None) {
282 if(!aux_ctrl_is_probe(aux_ctrl[idx].
function)) {
296 static bool __claim_in_port (
xbar_t *properties, uint8_t port,
void *data)
308 static bool __find_in_port (
xbar_t *properties, uint8_t port,
void *data)
321 if(aux_claim == NULL)
322 aux_claim = __claim_in_port;
324 for(idx = 0; idx <
sizeof(aux_ctrl) /
sizeof(
aux_ctrl_t); idx++) {
327 aux_claim_explicit(&aux_ctrl[idx]);
333 if(aux_ctrl[idx].gpio.
pin == 0xFE)
335 #ifdef STM32_PLATFORM
339 if(aux_ctrl[idx].gpio.
pin == 0xFF) {
349 #if PROBE_DISCONNECT_ENABLE || STOP_DISABLE_ENABLE || BLOCK_DELETE_ENABLE || SINGLE_BLOCK_ENABLE || LIMITS_OVERRIDE_ENABLE
351 uint_fast8_t idx =
sizeof(aux_ctrl) /
sizeof(
aux_ctrl_t);
354 if(!aux_ctrl[--idx].scan)
360 signals.
mask |= aux_ctrl[idx].signal.mask;
363 signals.
mask |= aux_ctrl[idx].signal.mask;
375 #if defined(ESP_PLATFORM) || defined(RP2040)
376 #if defined(STEPPERS_ENABLE_PIN) && STEPPERS_ENABLE_PORT == EXPANDER_PORT
379 #if defined(X_ENABLE_PIN) && X_ENABLE_PORT == EXPANDER_PORT
382 #if defined(X2_ENABLE_PIN) && X2_ENABLE_PORT == EXPANDER_PORT
385 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PORT == EXPANDER_PORT
388 #if defined(Y2_ENABLE_PIN) && Y2_ENABLE_PORT == EXPANDER_PORT
391 #if defined(XY_ENABLE_PIN) && XY_ENABLE_PORT == EXPANDER_PORT
394 #if defined(Z_ENABLE_PIN) && Z_ENABLE_PORT == EXPANDER_PORT
397 #if defined(Z2_ENABLE_PIN) && Z2_ENABLE_PORT == EXPANDER_PORT
400 #if defined(A_ENABLE_PIN) && A_ENABLE_PORT == EXPANDER_PORT
403 #if defined(B_ENABLE_PIN) && B_ENABLE_PORT == EXPANDER_PORT
406 #if defined(C_ENABLE_PIN) && C_ENABLE_PORT == EXPANDER_PORT
409 #if defined(U_ENABLE_PIN) && U_ENABLE_PORT == EXPANDER_PORT
412 #if defined(V_ENABLE_PIN) && V_ENABLE_PORT == EXPANDER_PORT
417 #ifdef SPINDLE_ENABLE_PIN
420 #ifdef SPINDLE_PWM_PIN
423 #ifdef SPINDLE_DIRECTION_PIN
426 #ifdef SPINDLE1_ENABLE_PIN
429 #ifdef SPINDLE1_DIRECTION_PIN
432 #ifdef SPINDLE1_PWM_PIN
435 #ifdef COOLANT_FLOOD_PIN
438 #ifdef COOLANT_MIST_PIN
441 #ifdef COPROC_RESET_PIN
444 #ifdef COPROC_BOOT0_PIN
447 #if defined(SPI_RST_PIN) && defined(RP2040)
449 #define SPI_RST_PORT 0
463 if(aux_ctrl_out[idx].gpio.
port == gpio.
port && aux_ctrl_out[idx].gpio.pin == gpio.
pin) {
464 ctrl_pin = &aux_ctrl_out[idx];
465 ctrl_pin->
port = port;
466 ctrl_pin->
output = output;
468 }
while(idx && ctrl_pin == NULL);
477 static bool __claim_out_port (
xbar_t *properties, uint8_t port,
void *data)
506 if(aux_claim == NULL)
507 aux_claim = __claim_out_port;
509 if(aux_claim_explicit == NULL)
510 aux_claim_explicit = ___claim_out_port_explicit;
512 for(idx = 0; idx <
sizeof(aux_ctrl_out) /
sizeof(
aux_ctrl_out_t); idx++) {
518 aux_claim_explicit(&aux_ctrl_out[idx]);
521 }
else if(aux_ctrl_out[idx].gpio.
pin == 0xFF) {
523 aux_claim_explicit(&aux_ctrl_out[idx]);
525 aux_claim_explicit(&aux_ctrl_out[idx]);
531 #if defined(SPINDLE_ENABLE_PIN) && !defined(SPINDLE_ENABLE_BIT)
532 #define SPINDLE_ENABLE_BIT (1<<SPINDLE_ENABLE_PIN)
534 #if defined(SPINDLE_DIRECTION_PIN) && !defined(SPINDLE_DIRECTION_BIT)
535 #define SPINDLE_DIRECTION_BIT (1<<SPINDLE_DIRECTION_PIN)
538 #if defined(SPINDLE1_ENABLE_PIN) && !defined(SPINDLE1_ENABLE_BIT)
539 #define SPINDLE1_ENABLE_BIT (1<<SPINDLE1_ENABLE_PIN)
541 #if defined(SPINDLE1_DIRECTION_PIN) && !defined(SPINDLE1_DIRECTION_BIT)
542 #define SPINDLE1_DIRECTION_BIT (1<<SPINDLE1_DIRECTION_PIN)
545 #if defined(COOLANT_FLOOD_PIN) && !defined(COOLANT_FLOOD_BIT)
546 #define COOLANT_FLOOD_BIT (1<<COOLANT_FLOOD_PIN)
548 #if defined(COOLANT_MIST_PIN) && !defined(COOLANT_MIST_BIT)
549 #define COOLANT_MIST_BIT (1<<COOLANT_MIST_PIN)
552 #if defined(RTS_PIN) && !defined(RTS_BIT)
553 #define RTS_BIT (1<<RTS_PIN)
556 #if defined(RS485_DIR_PIN) && !defined(RS485_DIR_BIT)
557 #define RS485_DIR_BIT (1<<RS485_DIR_PIN)
564 #define QEI_A_BIT (1<<QEI_A_PIN)
567 #define QEI_B_BIT (1<<QEI_B_PIN)
574 #ifndef QEI_SELECT_BIT
575 #define QEI_SELECT_BIT 0
578 #define MPG_MODE_BIT 0
580 #ifndef I2C_STROBE_BIT
581 #define I2C_STROBE_BIT 0
586 #if SPINDLE_ENCODER_ENABLE
587 #ifndef SPINDLE_PULSE_PIN
588 #error "Spindle encoder requires at least SPINDLE_PULSE_PIN defined in the board map!"
590 #if !defined(SPINDLE_PULSE_BIT) && defined(SPINDLE_PULSE_PIN)
591 #define SPINDLE_PULSE_BIT (1<<SPINDLE_PULSE_PIN)
593 #if !defined(SPINDLE_INDEX_BIT) && defined(SPINDLE_INDEX_PIN)
594 #define SPINDLE_INDEX_BIT (1<<SPINDLE_INDEX_PIN)
598 #ifndef SPINDLE_INDEX_BIT
599 #define SPINDLE_INDEX_BIT 0
601 #ifndef SPINDLE_PULSE_BIT
602 #define SPINDLE_PULSE_BIT 0
605 #if SPINDLE_ENCODER_ENABLE && (SPINDLE_INDEX_BIT + SPINDLE_PULSE_BIT) == 0
606 #error "Spindle encoder requires SPINDLE_PULSE_PIN and SPINDLE_INDEX_PIN defined in the board map!"
610 #define SPI_IRQ_BIT 0
611 #elif !defined(SPI_IRQ_BIT)
612 #define SPI_IRQ_BIT (1<<SPI_IRQ_PIN)
615 #ifndef DEVICES_IRQ_MASK
616 #define DEVICES_IRQ_MASK (SPI_IRQ_BIT|SPINDLE_INDEX_BIT|QEI_A_BIT|QEI_B_BIT|SD_DETECT_BIT)
617 #define DEVICES_IRQ_MASK_SUM (SPI_IRQ_BIT+SPINDLE_INDEX_BIT+QEI_A_BIT+QEI_B_BIT+SD_DETECT_BIT)
623 #define AUXINPUT0_BIT (1<<AUXINPUT0_PIN)
625 #define AUXINPUT0_BIT 0
628 #define AUXINPUT1_BIT (1<<AUXINPUT1_PIN)
630 #define AUXINPUT1_BIT 0
633 #define AUXINPUT2_BIT (1<<AUXINPUT2_PIN)
635 #define AUXINPUT2_BIT 0
638 #define AUXINPUT3_BIT (1<<AUXINPUT3_PIN)
640 #define AUXINPUT3_BIT 0
643 #define AUXINPUT4_BIT (1<<AUXINPUT4_PIN)
645 #define AUXINPUT4_BIT 0
648 #define AUXINPUT5_BIT (1<<AUXINPUT5_PIN)
650 #define AUXINPUT5_BIT 0
653 #define AUXINPUT6_BIT (1<<AUXINPUT6_PIN)
655 #define AUXINPUT6_BIT 0
658 #define AUXINPUT7_BIT (1<<AUXINPUT7_PIN)
660 #define AUXINPUT7_BIT 0
663 #define AUXINPUT8_BIT (1<<AUXINPUT8_PIN)
665 #define AUXINPUT8_BIT 0
668 #define AUXINPUT9_BIT (1<<AUXINPUT9_PIN)
670 #define AUXINPUT9_BIT 0
672 #ifdef AUXINPUT10_PIN
673 #define AUXINPUT10_BIT (1<<AUXINPUT10_PIN)
675 #define AUXINPUT10_BIT 0
677 #ifdef AUXINPUT11_PIN
678 #define AUXINPUT11_BIT (1<<AUXINPUT11_PIN)
680 #define AUXINPUT11_BIT 0
682 #ifdef AUXINPUT12_PIN
683 #define AUXINPUT12_BIT (1<<AUXINPUT12_PIN)
685 #define AUXINPUT12_BIT 0
687 #ifdef AUXINPUT13_PIN
688 #define AUXINPUT13_BIT (1<<AUXINPUT13_PIN)
690 #define AUXINPUT13_BIT 0
692 #ifdef AUXINPUT14_PIN
693 #define AUXINPUT14_BIT (1<<AUXINPUT14_PIN)
695 #define AUXINPUT14_BIT 0
697 #ifdef AUXINPUT15_PIN
698 #define AUXINPUT15_BIT (1<<AUXINPUT15_PIN)
700 #define AUXINPUT15_BIT 0
703 #ifndef AUXINPUT_MASK
704 #define AUXINPUT_MASK (AUXINPUT0_BIT|AUXINPUT1_BIT|AUXINPUT2_BIT|AUXINPUT3_BIT|AUXINPUT4_BIT|AUXINPUT5_BIT|AUXINPUT6_BIT|AUXINPUT7_BIT|\
705 AUXINPUT8_BIT|AUXINPUT9_BIT|AUXINPUT10_BIT|AUXINPUT11_BIT|AUXINPUT12_BIT|AUXINPUT13_BIT|AUXINPUT4_BIT|AUXINPUT15_BIT)
706 #define AUXINPUT_MASK_SUM (AUXINPUT0_BIT+AUXINPUT1_BIT+AUXINPUT2_BIT+AUXINPUT3_BIT+AUXINPUT4_BIT+AUXINPUT5_BIT+AUXINPUT6_BIT+AUXINPUT7_BIT+\
707 AUXINPUT8_BIT+AUXINPUT9_BIT+AUXINPUT10_BIT+AUXINPUT11_BIT+AUXINPUT12_BIT+AUXINPUT13_BIT+AUXINPUT4_BIT+AUXINPUT15_BIT)
const char * xbar_fn_to_pinname(pin_function_t fn)
Definition: crossbar.c:160
pin_function_t
Definition: crossbar.h:27
@ Input_FeedHold
Definition: crossbar.h:30
@ Input_Toolsetter
Definition: crossbar.h:58
@ Output_StepperEnableV
Definition: crossbar.h:182
@ Input_Reset
Definition: crossbar.h:29
@ Output_CoProc_Boot0
Definition: crossbar.h:236
@ Input_Probe
Definition: crossbar.h:43
@ Output_StepperEnableX
Definition: crossbar.h:172
@ Input_MotorFault
Definition: crossbar.h:37
@ Input_Probe2
Definition: crossbar.h:56
@ Input_MotorWarning
Definition: crossbar.h:38
@ Input_ToolsetterOvertravel
Definition: crossbar.h:41
@ Input_ProbeDisconnect
Definition: crossbar.h:36
@ Input_EStop
Definition: crossbar.h:35
@ Input_StopDisable
Definition: crossbar.h:34
@ Output_StepperEnableXY
Definition: crossbar.h:183
@ Input_LimitsOverride
Definition: crossbar.h:39
@ Output_CoProc_Reset
Definition: crossbar.h:235
@ Output_StepperEnableZ
Definition: crossbar.h:176
@ Input_QEI_Select
Definition: crossbar.h:260
@ Output_StepperEnableU
Definition: crossbar.h:181
@ Output_StepperEnableA
Definition: crossbar.h:178
@ Output_StepperEnableY2
Definition: crossbar.h:175
@ Input_BlockDelete
Definition: crossbar.h:33
@ Output_StepperEnable
Definition: crossbar.h:170
@ Output_SpindleDir
Definition: crossbar.h:186
@ Output_StepperEnableY
Definition: crossbar.h:174
@ Output_StepperEnableC
Definition: crossbar.h:180
@ Input_SingleBlock
Definition: crossbar.h:40
@ Output_SPIRST
Definition: crossbar.h:246
@ Output_SpindleOn
Definition: crossbar.h:185
@ Input_I2CStrobe
Definition: crossbar.h:253
@ Output_Spindle1Dir
Definition: crossbar.h:189
@ Output_SpindlePWM
Definition: crossbar.h:187
@ Output_CoolantMist
Definition: crossbar.h:191
@ Input_MPGSelect
Definition: crossbar.h:59
@ Output_Spindle1On
Definition: crossbar.h:188
@ Output_StepperEnableB
Definition: crossbar.h:179
@ Input_CycleStart
Definition: crossbar.h:31
@ Input_SafetyDoor
Definition: crossbar.h:32
@ Output_CoolantFlood
Definition: crossbar.h:192
@ Output_StepperEnableX2
Definition: crossbar.h:173
@ Output_StepperEnableZ2
Definition: crossbar.h:177
@ Output_Spindle1PWM
Definition: crossbar.h:190
pin_irq_mode_t
Pin interrupt modes, may be or'ed when reporting pin capability.
Definition: crossbar.h:557
@ IRQ_Mode_Rising
0b00001 (0x01)
Definition: crossbar.h:559
@ IRQ_Mode_RisingFalling
0b00011 (0x03) - only used to report port capability.
Definition: crossbar.h:561
@ IRQ_Mode_None
0b00000 (0x00)
Definition: crossbar.h:558
@ IRQ_Mode_Change
0b00100 (0x04)
Definition: crossbar.h:562
@ IRQ_Mode_Falling
0b00010 (0x02)
Definition: crossbar.h:560
#define SPINDLE_ENABLE
Definition: driver_opts.h:353
#define SPINDLE1_ENABLE
Definition: driver_opts.h:325
#define COOLANT_FLOOD
Definition: driver_opts.h:308
#define COOLANT_MIST
Definition: driver_opts.h:309
#define SPINDLE_PWM
Definition: driver_opts.h:317
@ WaitMode_Immediate
0 - This is the only mode allowed for analog inputs
Definition: gcode.h:293
DCRAM grbl_hal_t hal
Global HAL struct.
Definition: grbllib.c:91
xbar_t * ioport_claim(io_port_type_t type, io_port_direction_t dir, uint8_t *port, const char *description)
Claim a digital or analog port for exclusive use.
Definition: ioports.c:311
bool ioport_set_function(xbar_t *pin, pin_function_t function, driver_caps_t caps)
Set pin function.
Definition: ioports.c:387
bool ioports_enumerate(io_port_type_t type, io_port_direction_t dir, pin_cap_t filter, ioports_enumerate_callback_ptr callback, void *data)
Enumerate ports.
Definition: ioports.c:552
@ Port_Input
0
Definition: ioports.h:34
@ Port_Output
1
Definition: ioports.h:35
bool(* ioports_enumerate_callback_ptr)(xbar_t *properties, uint8_t port, void *data)
Definition: ioports.h:161
@ Port_Digital
1
Definition: ioports.h:30
#define IOPORT_UNASSIGNED
Definition: ioports.h:26
void(* ioport_interrupt_callback_ptr)(uint8_t port, bool state)
Pointer to callback function for input port interrupt events.
Definition: ioports.h:142
#define On
Definition: nuts_bolts.h:36
#define add_aux_input_scan(fn, irq, signal_bit)
Definition: pin_bits_masks.h:126
#define add_aux_input(fn, aux, irq, signal_bit)
Definition: pin_bits_masks.h:119
bool(* aux_claim_explicit_ptr)(aux_ctrl_t *aux_ctrl)
Definition: pin_bits_masks.h:292
#define add_aux_output(fn, aux)
Definition: pin_bits_masks.h:124
bool(* aux_claim_explicit_out_ptr)(aux_ctrl_out_t *aux_ctrl)
Definition: pin_bits_masks.h:473
#define add_aux_input_no_signal(fn, irq)
Definition: pin_bits_masks.h:127
#define add_aux_output_exp(fn, aux)
Definition: pin_bits_masks.h:128
#define EXPANDER_PORT
Definition: pin_bits_masks.h:56
settings_t settings
Definition: settings.c:46
Definition: crossbar.h:740
uint8_t port
Auxiliary port number, post claimed.
Definition: crossbar.h:742
void * output
Pointer to the driver input array entry for the pin.
Definition: crossbar.h:744
Definition: crossbar.h:730
pin_irq_mode_t irq_mode
Required IRQ mode for the input.
Definition: crossbar.h:733
control_signals_t signal
Set to the pin the input maps to, 0 if none.
Definition: crossbar.h:734
uint8_t port
Auxiliary port number, post claimed.
Definition: crossbar.h:732
void * input
Pointer to the driver input array entry for the pin.
Definition: crossbar.h:736
aux_gpio_t gpio
MCU port base address (may be NULL) and pin number.
Definition: crossbar.h:735
pin_function_t function
Pin function.
Definition: crossbar.h:731
Definition: crossbar.h:725
uint8_t pin
MCU pin number.
Definition: crossbar.h:727
void * port
MCU port address (may be NULL).
Definition: crossbar.h:726
io_port_t port
Optional handlers for axuillary I/O (adds support for M62-M66).
Definition: hal.h:681
control_signals_t signals_cap
Control input signals supported by the driver.
Definition: hal.h:717
wait_on_input_ptr wait_on_input
Optional handler for reading a digital or analog input.
Definition: ioports.h:171
ioport_register_interrupt_handler_ptr register_interrupt_handler
Definition: ioports.h:176
Definition: settings.h:877
control_signals_t control_invert
Definition: settings.h:889
Definition: crossbar.h:747
xbar_set_value_ptr set_value
Optional pointer to function to set port value.
Definition: crossbar.h:759
uint_fast8_t pin
Pin number.
Definition: crossbar.h:754
void * port
Optional pointer to the underlying peripheral or pin specific data.
Definition: crossbar.h:752
Definition: nuts_bolts.h:250
uint16_t mask
Definition: nuts_bolts.h:252
Definition: crossbar.h:615
uint32_t irq_mode
pin_irq_mode_t - IRQ modes
Definition: crossbar.h:622