/drivers/hdf_core/framework/sample/platform/uart/src/ |
D | uart_sample.c | 186 struct DeviceResourceIface *dri = NULL; in GetUartDeviceResource() local 187 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetUartDeviceResource() 188 if (dri == NULL || dri->GetUint32 == NULL) { in GetUartDeviceResource() 193 if (dri->GetUint32(resourceNode, "num", &resource->num, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 197 if (dri->GetUint32(resourceNode, "base", &resource->base, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 206 if (dri->GetUint32(resourceNode, "irqNum", &resource->irqNum, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 210 if (dri->GetUint32(resourceNode, "baudrate", &resource->baudrate, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 214 if (dri->GetUint32(resourceNode, "wlen", &resource->wlen, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 218 if (dri->GetUint32(resourceNode, "parity", &resource->parity, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 222 if (dri->GetUint32(resourceNode, "stopBit", &resource->stopBit, 0) != HDF_SUCCESS) { in GetUartDeviceResource() [all …]
|
/drivers/hdf_core/adapter/platform/pwm/ |
D | pwm_wm.c | 67 struct DeviceResourceIface *dri = NULL; in GetPwmDeviceResource() local 80 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetPwmDeviceResource() 81 if (dri == NULL || dri->GetUint32 == NULL) { in GetPwmDeviceResource() 86 if (dri->GetUint32(resourceNode, "channel", &resource->channel, 0) != HDF_SUCCESS) { in GetPwmDeviceResource() 91 if (dri->GetUint32(resourceNode, "freq", &resource->freq, 0) != HDF_SUCCESS) { in GetPwmDeviceResource()
|
D | pwm_bes.c | 121 struct DeviceResourceIface *dri = NULL; in GetPwmDeviceResource() local 134 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetPwmDeviceResource() 135 if (dri == NULL || dri->GetUint32 == NULL) { in GetPwmDeviceResource() 140 if (dri->GetUint32(resourceNode, "pwmPin", &tempPin, 0) != HDF_SUCCESS) { in GetPwmDeviceResource() 146 if (dri->GetUint32(resourceNode, "pwmId", &resource->pwmId, 0) != HDF_SUCCESS) { in GetPwmDeviceResource()
|
D | pwm_stm32f4xx.c | 233 struct DeviceResourceIface *dri = NULL; in GetPwmDeviceResource() local 247 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetPwmDeviceResource() 248 if (dri == NULL || dri->GetUint8 == NULL || dri->GetUint32 == NULL) { in GetPwmDeviceResource() 253 if (dri->GetUint8(resourceNode, "pwmTim", &resource->pwmTim, 0) != HDF_SUCCESS) { in GetPwmDeviceResource() 263 if (dri->GetUint8(resourceNode, "pwmCh", &resource->pwmCh, 0) != HDF_SUCCESS) { in GetPwmDeviceResource() 268 if (dri->GetUint32(resourceNode, "prescaler", &resource->prescaler, 0) != HDF_SUCCESS) { in GetPwmDeviceResource()
|
/drivers/hdf_core/adapter/platform/i2c/ |
D | i2c_bes.c | 179 struct DeviceResourceIface *dri = NULL; in GetI2cDeviceResource() local 189 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetI2cDeviceResource() 190 if (dri == NULL || dri->GetUint32 == NULL) { in GetI2cDeviceResource() 195 if (dri->GetUint32(resourceNode, "port", &resource->port, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 200 if (dri->GetUint32(resourceNode, "sclPin", &tempPin, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 206 if (dri->GetUint32(resourceNode, "sdaPin", &tempPin, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 212 if (dri->GetUint32(resourceNode, "speed", &resource->speed, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 217 if (dri->GetUint32(resourceNode, "mode", &resource->mode, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 222 if (dri->GetUint32(resourceNode, "useDma", &resource->useDma, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 227 if (dri->GetUint32(resourceNode, "useSync", &resource->useSync, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() [all …]
|
D | i2c_stm32f4xx.c | 106 struct DeviceResourceIface *dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetI2cDeviceResource() local 107 …if (dri == NULL || dri->GetUint8 == NULL || dri->GetUint32 == NULL || dri->GetUint32Array == NULL)… in GetI2cDeviceResource() 112 if (dri->GetUint8(resourceNode, "port", &i2cResource->port, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 117 if (dri->GetUint8(resourceNode, "devMode", &i2cResource->devMode, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 122 if (dri->GetUint32(resourceNode, "devAddr", &i2cResource->devAddr, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 127 if (dri->GetUint32(resourceNode, "speed", &i2cResource->speed, 0) != HDF_SUCCESS) { in GetI2cDeviceResource()
|
D | i2c_wm.c | 133 struct DeviceResourceIface *dri = NULL; in GetI2cDeviceResource() local 143 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetI2cDeviceResource() 144 if (dri == NULL || dri->GetUint32 == NULL) { in GetI2cDeviceResource() 149 if (dri->GetUint32(resourceNode, "port", &resource->port, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 154 if (dri->GetUint32(resourceNode, "sclPin", &tempPin, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 160 if (dri->GetUint32(resourceNode, "sdaPin", &tempPin, 0) != HDF_SUCCESS) { in GetI2cDeviceResource() 166 if (dri->GetUint32(resourceNode, "speed", &resource->speed, 0) != HDF_SUCCESS) { in GetI2cDeviceResource()
|
/drivers/hdf_core/adapter/platform/gpio/ |
D | gpio_stm32f4xx.c | 220 static int32_t GpioParseHcs(const struct DeviceResourceIface *dri, in GpioParseHcs() argument 230 if (dri->GetUint32(resourceNode, "pinNum", &device->pinNums, 0) != HDF_SUCCESS) { in GpioParseHcs() 236 if (dri->GetUint32ArrayElem(resourceNode, "pin", i, &resource->pin, 0) != HDF_SUCCESS) { in GpioParseHcs() 240 … if (dri->GetUint32ArrayElem(resourceNode, "realPin", i, &resource->realPin, 0) != HDF_SUCCESS) { in GpioParseHcs() 244 if (dri->GetUint32ArrayElem(resourceNode, "mode", i, &resource->mode, 0) != HDF_SUCCESS) { in GpioParseHcs() 248 if (dri->GetUint32ArrayElem(resourceNode, "speed", i, &resource->speed, 0) != HDF_SUCCESS) { in GpioParseHcs() 252 if (dri->GetUint32ArrayElem(resourceNode, "pull", i, &resource->pull, 0) != HDF_SUCCESS) { in GpioParseHcs() 256 … if (dri->GetUint32ArrayElem(resourceNode, "output", i, &resource->outputType, 0) != HDF_SUCCESS) { in GpioParseHcs() 260 if (dri->GetUint32ArrayElem(resourceNode, "group", i, &resource->group, 0) != HDF_SUCCESS) { in GpioParseHcs() 264 …if (dri->GetUint32ArrayElem(resourceNode, "alternate", i, &resource->alternate, 0) != HDF_SUCCESS)… in GpioParseHcs() [all …]
|
D | gpio_wm.c | 259 struct DeviceResourceIface *dri = NULL; in GetGpioDeviceResource() local 270 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetGpioDeviceResource() 271 if (dri == NULL || dri->GetUint32 == NULL || dri->GetUint32ArrayElem == NULL) { in GetGpioDeviceResource() 276 if (dri->GetUint32(resourceNode, "groupNum", &resource->groupNum, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 281 if (dri->GetUint32(resourceNode, "pinNum", &resource->pinNum, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 287 … if (dri->GetUint32ArrayElem(resourceNode, "config", i, &resource->config, 0) != HDF_SUCCESS) { in GetGpioDeviceResource()
|
D | gpio_asr.c | 323 struct DeviceResourceIface *dri = NULL; in GetGpioDeviceResource() local 333 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetGpioDeviceResource() 334 if (dri == NULL || dri->GetUint32 == NULL) { in GetGpioDeviceResource() 339 if (dri->GetUint32(resourceNode, "pinNum", &resource->pinNum, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 345 if (dri->GetUint32ArrayElem(resourceNode, "pin", i, &resource->pin, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 350 … if (dri->GetUint32ArrayElem(resourceNode, "realPin", i, &resource->realPin, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 355 … if (dri->GetUint32ArrayElem(resourceNode, "config", i, &resource->config, 0) != HDF_SUCCESS) { in GetGpioDeviceResource()
|
D | gpio_bes.c | 210 struct DeviceResourceIface *dri = NULL; in GetGpioDeviceResource() local 220 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetGpioDeviceResource() 221 if (dri == NULL || dri->GetUint32 == NULL) { in GetGpioDeviceResource() 226 if (dri->GetUint32(resourceNode, "pinNum", &resource->pinNum, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 232 if (dri->GetUint32ArrayElem(resourceNode, "pin", i, &resource->pin, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 237 … if (dri->GetUint32ArrayElem(resourceNode, "realPin", i, &resource->realPin, 0) != HDF_SUCCESS) { in GetGpioDeviceResource() 242 … if (dri->GetUint32ArrayElem(resourceNode, "config", i, &resource->config, 0) != HDF_SUCCESS) { in GetGpioDeviceResource()
|
/drivers/hdf_core/adapter/platform/uart/ |
D | uart_stm32f4xx.c | 370 static int32_t GetUartHcs(const struct DeviceResourceIface *dri, in GetUartHcs() argument 373 if (dri->GetUint8(resourceNode, "num", &resource->num, 0) != HDF_SUCCESS) { in GetUartHcs() 377 if (dri->GetUint32(resourceNode, "baudRate", &resource->baudRate, 0) != HDF_SUCCESS) { in GetUartHcs() 381 if (dri->GetUint8(resourceNode, "dataWidth", &resource->dataWidth, 0) != HDF_SUCCESS) { in GetUartHcs() 385 if (dri->GetUint8(resourceNode, "stopBit", &resource->stopBit, 0) != HDF_SUCCESS) { in GetUartHcs() 389 if (dri->GetUint8(resourceNode, "parity", &resource->parity, 0) != HDF_SUCCESS) { in GetUartHcs() 393 if (dri->GetUint8(resourceNode, "transDir", &resource->transDir, 0) != HDF_SUCCESS) { in GetUartHcs() 397 if (dri->GetUint8(resourceNode, "flowCtrl", &resource->flowCtrl, 0) != HDF_SUCCESS) { in GetUartHcs() 401 if (dri->GetUint8(resourceNode, "overSimpling", &resource->overSimpling, 0) != HDF_SUCCESS) { in GetUartHcs() 405 if (dri->GetUint8(resourceNode, "transMode", &resource->transMode, 0) != HDF_SUCCESS) { in GetUartHcs() [all …]
|
D | uart_wm.c | 255 struct DeviceResourceIface *dri = NULL; in GetUartDeviceResource() local 267 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetUartDeviceResource() 268 if (dri == NULL || dri->GetUint32 == NULL) { in GetUartDeviceResource() 272 if (dri->GetUint32(resourceNode, "num", &resource->num, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 276 if (dri->GetUint32(resourceNode, "baudrate", &resource->baudRate, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 280 if (dri->GetUint32(resourceNode, "parity", &resource->parity, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 284 if (dri->GetUint32(resourceNode, "stopBit", &resource->stopBit, 0) != HDF_SUCCESS) { in GetUartDeviceResource()
|
D | uart_bes.c | 513 struct DeviceResourceIface *dri = NULL; in GetUartDeviceResource() local 525 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetUartDeviceResource() 526 if (dri == NULL || dri->GetUint32 == NULL) { in GetUartDeviceResource() 530 if (dri->GetUint32(resourceNode, "num", &resource->num, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 534 if (dri->GetUint32(resourceNode, "baudrate", &resource->baudRate, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 538 if (dri->GetUint32(resourceNode, "parity", &resource->parity, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 542 if (dri->GetUint32(resourceNode, "stopBit", &resource->stopBit, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 546 if (dri->GetUint32(resourceNode, "data", &resource->wLen, 0) != HDF_SUCCESS) { in GetUartDeviceResource() 551 resource->txDMA = dri->GetBool(resourceNode, "txDMA"); in GetUartDeviceResource() 552 resource->rxDMA = dri->GetBool(resourceNode, "rxDMA"); in GetUartDeviceResource()
|
/drivers/hdf_core/adapter/platform/spi/ |
D | spi_bes.c | 472 struct DeviceResourceIface *dri = NULL; in GetSpiDeviceResource() local 483 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); // open HDF in GetSpiDeviceResource() 484 if (dri == NULL || dri->GetUint32 == NULL) { in GetSpiDeviceResource() 489 if (dri->GetUint32(resourceNode, "busNum", &resource->num, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 495 if (dri->GetUint32(resourceNode, "speed", &resource->speed, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 500 if (dri->GetUint32(resourceNode, "transmode", &resource->transmode, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 505 if (dri->GetUint32(resourceNode, "spiCsSoft", &resource->spiCsSoft, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 510 if (dri->GetUint32(resourceNode, "mode", &resource->mode, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 515 if (dri->GetUint32(resourceNode, "dataSize", &resource->dataSize, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 520 if (dri->GetUint32(resourceNode, "csNum", &resource->csNum, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() [all …]
|
D | spi_wm.c | 231 struct DeviceResourceIface *dri = NULL; in GetSpiDeviceResource() local 242 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); // open HDF in GetSpiDeviceResource() 243 if (dri == NULL || dri->GetUint32 == NULL) { in GetSpiDeviceResource() 248 if (dri->GetUint32(resourceNode, "num", &resource->num, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 254 if (dri->GetUint32(resourceNode, "speed", &resource->speed, 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 259 if (dri->GetUint32(resourceNode, "transmode", &resource->transmode, 0) != HDF_SUCCESS) { in GetSpiDeviceResource()
|
D | spi_stm32f4xx.c | 457 struct DeviceResourceIface *dri = NULL; in GetSpiDeviceResource() local 468 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); // open HDF in GetSpiDeviceResource() 469 if (dri == NULL || dri->GetUint16 == NULL || dri->GetUint8 == NULL || dri->GetUint32 == NULL) { in GetSpiDeviceResource() 475 if (dri->GetUint8(resourceNode, g_parseHcsMap[i], &temp[i], 0) != HDF_SUCCESS) { in GetSpiDeviceResource() 485 if (dri->GetUint16(resourceNode, "crcPoly", &resource->crcPoly, 0) != HDF_SUCCESS) { in GetSpiDeviceResource()
|
/drivers/hdf_core/adapter/platform/watchdog/ |
D | watchdog_wm.c | 120 struct DeviceResourceIface *dri = NULL; in GetWatchdogDeviceResource() local 132 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetWatchdogDeviceResource() 133 if (dri == NULL || dri->GetUint32 == NULL) { in GetWatchdogDeviceResource()
|
D | watchdog_stm32f4xx.c | 93 struct DeviceResourceIface *dri = NULL; in GetWatchdogDeviceInfoResource() local 99 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetWatchdogDeviceInfoResource() 100 if (dri == NULL || dri->GetUint32 == NULL) { in GetWatchdogDeviceInfoResource() 105 if (dri->GetUint32(resourceNode, "id", &device->watchdogId, 0) != HDF_SUCCESS) { in GetWatchdogDeviceInfoResource() 109 if (dri->GetUint32(resourceNode, "timeout", &device->timeout, 0) != HDF_SUCCESS) { in GetWatchdogDeviceInfoResource()
|
D | watchdog_bes.c | 69 struct DeviceResourceIface *dri = NULL; in GetWatchdogDeviceResource() local 81 dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); in GetWatchdogDeviceResource() 82 if (dri == NULL || dri->GetUint32 == NULL) { in GetWatchdogDeviceResource() 86 if (dri->GetUint32(resourceNode, "watchdogId", &resource->watchdogId, 0) != HDF_SUCCESS) { in GetWatchdogDeviceResource()
|