/loramac-node-3.4.0/src/boards/SKiM980A/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI2 ); in SpiInit() [all …]
|
D | uart-board.c | 41 void UartMcuInit( Uart_t *obj, UartId_t uartId, PinNames tx, PinNames rx ) in UartMcuInit() argument 43 obj->UartId = uartId; in UartMcuInit() 48 UartUsbInit( obj, uartId, NC, NC ); in UartMcuInit() 57 GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART1 ); in UartMcuInit() 58 GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART1 ); in UartMcuInit() 62 void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopB… in UartMcuConfig() argument 64 if( obj->UartId == UART_USB_CDC ) in UartMcuConfig() 67 UartUsbConfig( obj, mode, baudrate, wordLength, stopBits, parity, flowCtrl ); in UartMcuConfig() 77 if( obj->FifoTx.Data == NULL ) in UartMcuConfig() 85 if( obj->FifoRx.Data == NULL ) in UartMcuConfig() [all …]
|
/loramac-node-3.4.0/src/boards/NucleoL152/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI2 ); in SpiInit() [all …]
|
/loramac-node-3.4.0/src/boards/NucleoL476/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI2 ); in SpiInit() [all …]
|
/loramac-node-3.4.0/src/boards/SKiM880B/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI2 ); in SpiInit() [all …]
|
D | uart-board.c | 41 void UartMcuInit( Uart_t *obj, UartId_t uartId, PinNames tx, PinNames rx ) in UartMcuInit() argument 43 obj->UartId = uartId; in UartMcuInit() 48 UartUsbInit( obj, uartId, NC, NC ); in UartMcuInit() 57 GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART1 ); in UartMcuInit() 58 GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART1 ); in UartMcuInit() 62 void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopB… in UartMcuConfig() argument 64 if( obj->UartId == UART_USB_CDC ) in UartMcuConfig() 67 UartUsbConfig( obj, mode, baudrate, wordLength, stopBits, parity, flowCtrl ); in UartMcuConfig() 77 if( obj->FifoTx.Data == NULL ) in UartMcuConfig() 85 if( obj->FifoRx.Data == NULL ) in UartMcuConfig() [all …]
|
/loramac-node-3.4.0/src/boards/NAMote72/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF5_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF5_SPI2 ); in SpiInit() [all …]
|
D | uart-board.c | 47 void UartMcuInit( Uart_t *obj, UartId_t uartId, PinNames tx, PinNames rx ) in UartMcuInit() argument 52 UartUsbInit( obj, uartId, NC, NC ); in UartMcuInit() 57 obj->UartId = uartId; in UartMcuInit() 59 if( obj->UartId == UART_1 ) in UartMcuInit() 65 … GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART1 ); in UartMcuInit() 66 … GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART1 ); in UartMcuInit() 68 else if( obj->UartId == UART_2 ) in UartMcuInit() 74 … GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART2 ); in UartMcuInit() 75 … GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF7_USART2 ); in UartMcuInit() 80 void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopB… in UartMcuConfig() argument [all …]
|
/loramac-node-3.4.0/src/system/ |
D | timer.c | 58 static void TimerInsertNewHeadTimer( TimerEvent_t *obj ); 69 static void TimerInsertTimer( TimerEvent_t *obj ); 76 static void TimerSetTimeout( TimerEvent_t *obj ); 84 static bool TimerExists( TimerEvent_t *obj ); 86 void TimerInit( TimerEvent_t *obj, void ( *callback )( void *context ) ) in TimerInit() argument 88 obj->Timestamp = 0; in TimerInit() 89 obj->ReloadValue = 0; in TimerInit() 90 obj->IsStarted = false; in TimerInit() 91 obj->IsNext2Expire = false; in TimerInit() 92 obj->Callback = callback; in TimerInit() [all …]
|
D | i2c.c | 32 void I2cInit( I2c_t *obj, I2cId_t i2cId, PinNames scl, PinNames sda ) in I2cInit() argument 38 I2cMcuInit( obj, i2cId, scl, sda ); in I2cInit() 39 I2cMcuFormat( obj, MODE_I2C, I2C_DUTY_CYCLE_2, true, I2C_ACK_ADD_7_BIT, 400000 ); in I2cInit() 43 void I2cDeInit( I2c_t *obj ) in I2cDeInit() argument 46 I2cMcuDeInit( obj ); in I2cDeInit() 49 void I2cResetBus( I2c_t *obj ) in I2cResetBus() argument 51 I2cMcuResetBus( obj ); in I2cResetBus() 54 LmnStatus_t I2cWrite( I2c_t *obj, uint8_t deviceAddr, uint8_t data ) in I2cWrite() argument 58 if( I2cMcuWriteBuffer( obj, deviceAddr, &data, 1 ) == LMN_STATUS_ERROR ) in I2cWrite() 61 if( I2cMcuWriteBuffer( obj, deviceAddr, &data, 1 ) == LMN_STATUS_ERROR ) in I2cWrite() [all …]
|
/loramac-node-3.4.0/src/boards/NucleoL073/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF0_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF0_SPI2 ); in SpiInit() [all …]
|
D | uart-board.c | 41 void UartMcuInit( Uart_t *obj, UartId_t uartId, PinNames tx, PinNames rx ) in UartMcuInit() argument 43 obj->UartId = uartId; in UartMcuInit() 48 UartUsbInit( obj, uartId, NC, NC ); in UartMcuInit() 57 GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF4_USART2 ); in UartMcuInit() 58 GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF4_USART2 ); in UartMcuInit() 62 void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopB… in UartMcuConfig() argument 64 if( obj->UartId == UART_USB_CDC ) in UartMcuConfig() 67 UartUsbConfig( obj, mode, baudrate, wordLength, stopBits, parity, flowCtrl ); in UartMcuConfig() 77 if( obj->FifoTx.Data == NULL ) in UartMcuConfig() 85 if( obj->FifoRx.Data == NULL ) in UartMcuConfig() [all …]
|
/loramac-node-3.4.0/src/boards/SKiM881AXL/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF0_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF0_SPI2 ); in SpiInit() [all …]
|
D | uart-board.c | 41 void UartMcuInit( Uart_t *obj, UartId_t uartId, PinNames tx, PinNames rx ) in UartMcuInit() argument 43 obj->UartId = uartId; in UartMcuInit() 48 UartUsbInit( obj, uartId, NC, NC ); in UartMcuInit() 57 GpioInit( &obj->Tx, tx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF4_USART1 ); in UartMcuInit() 58 GpioInit( &obj->Rx, rx, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF4_USART1 ); in UartMcuInit() 62 void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopB… in UartMcuConfig() argument 64 if( obj->UartId == UART_USB_CDC ) in UartMcuConfig() 67 UartUsbConfig( obj, mode, baudrate, wordLength, stopBits, parity, flowCtrl ); in UartMcuConfig() 77 if( obj->FifoTx.Data == NULL ) in UartMcuConfig() 85 if( obj->FifoRx.Data == NULL ) in UartMcuConfig() [all …]
|
/loramac-node-3.4.0/src/boards/B-L072Z-LRWAN1/ |
D | gpio-board.c | 35 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 41 obj->pin = pin; in GpioMcuInit() 48 obj->pinIndex = ( 0x01 << ( obj->pin & 0x0F ) ); in GpioMcuInit() 50 if( ( obj->pin & 0xF0 ) == 0x00 ) in GpioMcuInit() 52 obj->port = GPIOA; in GpioMcuInit() 55 else if( ( obj->pin & 0xF0 ) == 0x10 ) in GpioMcuInit() 57 obj->port = GPIOB; in GpioMcuInit() 60 else if( ( obj->pin & 0xF0 ) == 0x20 ) in GpioMcuInit() 62 obj->port = GPIOC; in GpioMcuInit() 65 else if( ( obj->pin & 0xF0 ) == 0x30 ) in GpioMcuInit() [all …]
|
D | spi-board.c | 31 void SpiInit( Spi_t *obj, SpiId_t spiId, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss ) in SpiInit() argument 35 obj->SpiId = spiId; in SpiInit() 45 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 46 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 47 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI1 ); in SpiInit() 48 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF0_SPI1 ); in SpiInit() 58 … GpioInit( &obj->Mosi, mosi, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 59 … GpioInit( &obj->Miso, miso, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 60 … GpioInit( &obj->Sclk, sclk, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_DOWN, GPIO_AF0_SPI2 ); in SpiInit() 61 GpioInit( &obj->Nss, nss, PIN_ALTERNATE_FCT, PIN_PUSH_PULL, PIN_PULL_UP, GPIO_AF0_SPI2 ); in SpiInit() [all …]
|
/loramac-node-3.4.0/src/peripherals/ |
D | gpio-ioe.c | 30 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() 44 obj->pinIndex = ( obj->pinIndex >> 8 ) & 0x00FF; in GpioIoeInit() 49 obj->pinIndex = ( obj->pinIndex ) & 0x00FF; in GpioIoeInit() 56 regVal = regVal & ~obj->pinIndex; in GpioIoeInit() 60 regVal = regVal | obj->pinIndex; in GpioIoeInit() 65 if( ( obj->pin % 16 ) > 0x07 ) in GpioIoeInit() 70 SX1509Write( RegOpenDrainB, tempVal | obj->pinIndex ); in GpioIoeInit() [all …]
|
/loramac-node-3.4.0/src/boards/SAMR34/ |
D | gpio-board.c | 29 void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint3… in GpioMcuInit() argument 31 obj->pin = pin; 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() 54 GpioMcuWrite( obj, value ); in GpioMcuInit() 58 void GpioMcuSetContext( Gpio_t *obj, void* context ) in GpioMcuSetContext() argument 60 obj->Context = context; in GpioMcuSetContext() 63 void GpioMcuSetInterrupt( Gpio_t *obj, IrqModes irqMode, IrqPriorities irqPriority, GpioIrqHandler … in GpioMcuSetInterrupt() argument 68 void GpioMcuRemoveInterrupt( Gpio_t *obj ) in GpioMcuRemoveInterrupt() argument [all …]
|