Home
last modified time | relevance | path

Searched refs:pin (Results 1 – 25 of 51) sorted by relevance

123

/loramac-node-3.7.0/src/boards/mcu/saml21/hal/src/
Dhal_ext_irq.c58 uint32_t pin; member
72 static void process_ext_irq(const uint32_t pin);
82 ext_irqs[i].pin = 0xFFFFFFFF; in ext_irq_init()
100 int32_t ext_irq_register(const uint32_t pin, ext_irq_cb_t cb) in ext_irq_register() argument
106 if (ext_irqs[i].pin == pin) { in ext_irq_register()
117 return _ext_irq_enable(pin, false); in ext_irq_register()
124 ext_irqs[i].pin = pin; in ext_irq_register()
130 if ((ext_irqs[i].pin < ext_irqs[j].pin) && (ext_irqs[j].pin != 0xFFFFFFFF)) { in ext_irq_register()
143 return _ext_irq_enable(pin, true); in ext_irq_register()
149 int32_t ext_irq_enable(const uint32_t pin) in ext_irq_enable() argument
[all …]
/loramac-node-3.7.0/src/boards/mcu/saml21/hal/include/
Dhal_gpio.h63 static inline void gpio_set_pin_pull_mode(const uint8_t pin, const enum gpio_pull_mode pull_mode) in gpio_set_pin_pull_mode() argument
65 _gpio_set_pin_pull_mode((enum gpio_port)GPIO_PORT(pin), pin & 0x1F, pull_mode); in gpio_set_pin_pull_mode()
78 static inline void gpio_set_pin_function(const uint32_t pin, uint32_t function) in gpio_set_pin_function() argument
80 _gpio_set_pin_function(pin, function); in gpio_set_pin_function()
116 static inline void gpio_set_pin_direction(const uint8_t pin, const enum gpio_direction direction) in gpio_set_pin_direction() argument
118 _gpio_set_direction((enum gpio_port)GPIO_PORT(pin), 1U << GPIO_PIN(pin), direction); in gpio_set_pin_direction()
147 static inline void gpio_set_pin_level(const uint8_t pin, const bool level) in gpio_set_pin_level() argument
149 _gpio_set_level((enum gpio_port)GPIO_PORT(pin), 1U << GPIO_PIN(pin), level); in gpio_set_pin_level()
174 static inline void gpio_toggle_pin_level(const uint8_t pin) in gpio_toggle_pin_level() argument
176 _gpio_toggle_level((enum gpio_port)GPIO_PORT(pin), 1U << GPIO_PIN(pin)); in gpio_toggle_pin_level()
[all …]
Dhal_ext_irq.h92 int32_t ext_irq_register(const uint32_t pin, ext_irq_cb_t cb);
103 int32_t ext_irq_enable(const uint32_t pin);
114 int32_t ext_irq_disable(const uint32_t pin);
Dhpl_gpio.h68 #define GPIO(port, pin) ((((port)&0x7u) << 5) + ((pin)&0x1Fu)) argument
173 static inline void _gpio_set_pin_pull_mode(const enum gpio_port port, const uint8_t pin,
Dhpl_ext_irq.h77 int32_t _ext_irq_init(void (*cb)(const uint32_t pin));
98 int32_t _ext_irq_enable(const uint32_t pin, const bool enable);
/loramac-node-3.7.0/src/boards/SAMR34/
Dgpio-board.c29 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
31 obj->pin = pin; in GpioMcuInit()
33 if( pin == NC ) in GpioMcuInit()
42 gpio_set_pin_direction( obj->pin, GPIO_DIRECTION_IN ); in GpioMcuInit()
43 …gpio_set_pin_pull_mode( obj->pin, type ); // the pull up/down need to be set after the direction f… in GpioMcuInit()
47 gpio_set_pin_direction( obj->pin, GPIO_DIRECTION_OUT ); in GpioMcuInit()
82 if( obj->pin == NC ) in GpioMcuWrite()
86 gpio_set_pin_level( obj->pin, value ); in GpioMcuWrite()
98 if( obj->pin == NC ) in GpioMcuToggle()
102 gpio_toggle_pin_level( obj->pin ); in GpioMcuToggle()
[all …]
Dspi-board.c71 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
72 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
73 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
74 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/NucleoL152/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
124 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/NucleoL476/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
124 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/NAMote72/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
124 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/SKiM881AXL/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
123 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/SKiM880B/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
124 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/NucleoL073/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
123 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/B-L072Z-LRWAN1/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
123 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
/loramac-node-3.7.0/src/boards/SKiM980A/
Dgpio-board.c35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument
37 if( pin < IOE_0 ) in GpioMcuInit()
41 obj->pin = pin; in GpioMcuInit()
43 if( pin == NC ) in GpioMcuInit()
48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit()
50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit()
55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit()
60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit()
65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit()
124 GpioIoeInit( obj, pin, mode, config, type, value ); in GpioMcuInit()
[all …]
Dspi-board.c84 GpioInit( &obj->Mosi, obj->Mosi.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
85 GpioInit( &obj->Miso, obj->Miso.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 0 ); in SpiDeInit()
86 GpioInit( &obj->Sclk, obj->Sclk.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); in SpiDeInit()
87 GpioInit( &obj->Nss, obj->Nss.pin, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); in SpiDeInit()
/loramac-node-3.7.0/src/boards/mcu/saml21/hpl/port/
Dhpl_gpio_base.h124 static inline void _gpio_set_pin_pull_mode(const enum gpio_port port, const uint8_t pin, in _gpio_set_pin_pull_mode() argument
129 hri_port_clear_PINCFG_PULLEN_bit(PORT, port, pin); in _gpio_set_pin_pull_mode()
133 hri_port_clear_DIR_reg(PORT_IOBUS, port, 1U << pin); in _gpio_set_pin_pull_mode()
134 hri_port_set_PINCFG_PULLEN_bit(PORT, port, pin); in _gpio_set_pin_pull_mode()
135 hri_port_set_OUT_reg(PORT_IOBUS, port, 1U << pin); in _gpio_set_pin_pull_mode()
139 hri_port_clear_DIR_reg(PORT_IOBUS, port, 1U << pin); in _gpio_set_pin_pull_mode()
140 hri_port_set_PINCFG_PULLEN_bit(PORT, port, pin); in _gpio_set_pin_pull_mode()
141 hri_port_clear_OUT_reg(PORT_IOBUS, port, 1U << pin); in _gpio_set_pin_pull_mode()
156 uint8_t pin = GPIO_PIN(gpio); in _gpio_set_pin_function() local
159 hri_port_write_PINCFG_PMUXEN_bit(PORT, port, pin, false); in _gpio_set_pin_function()
[all …]
/loramac-node-3.7.0/src/boards/mcu/saml21/hpl/eic/
Dhpl_eic.c90 uint32_t pin; member
101 static void (*callback)(const uint32_t pin);
108 int32_t _ext_irq_init(void (*cb)(const uint32_t pin)) in _ext_irq_init() argument
204 int32_t _ext_irq_enable(const uint32_t pin, const bool enable) in _ext_irq_enable() argument
210 if (_map[i].pin == pin) { in _ext_irq_enable()
236 uint32_t pin = INVALID_PIN_NUMBER; in _ext_irq_handler() local
250 pin = _map[middle].pin; in _ext_irq_handler()
260 if (INVALID_PIN_NUMBER != pin) { in _ext_irq_handler()
261 callback(pin); in _ext_irq_handler()
/loramac-node-3.7.0/src/peripherals/
Dgpio-ioe.c30 void GpioIoeInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint… in GpioIoeInit() argument
38 obj->pin = pin; in GpioIoeInit()
39 obj->pinIndex = ( 0x01 << pin % 16 ); in GpioIoeInit()
41 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeInit()
65 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeInit()
126 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeSetInterrupt()
211 GpioIrq[obj->pin & 0x0F] = obj; in GpioIoeSetInterrupt()
222 GpioIrq[obj->pin & 0x0F] = NULL; in GpioIoeRemoveInterrupt()
224 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeRemoveInterrupt()
302 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeWrite()
[all …]

123