/ohos5.0/drivers/hdf_core/adapter/khdf/liteos/osal/src/ |
H A D | osal_cdev.c | 48 static int OsalCdevOpen(struct file *filep) in OsalCdevOpen() argument 52 return dev->opsImpl->open(dev, filep); in OsalCdevOpen() 57 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevRelease() 67 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevRead() 77 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevWrite() 87 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevSeek() 97 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevIoctl() 107 if (filep == NULL || filep->f_vnode == NULL) { in OsalCdevPoll() 178 if (filep != NULL) { in OsalSetFilePriv() 179 filep->f_priv = priv; in OsalSetFilePriv() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/liteos/platform/src/ |
H A D | uart_dev.c | 42 static int32_t UartDevOpen(struct file *filep) in UartDevOpen() argument 46 if (filep == NULL || filep->f_vnode == NULL) { in UartDevOpen() 50 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartDevOpen() 55 static int32_t UartDevRelease(struct file *filep) in UartDevRelease() argument 59 if (filep == NULL || filep->f_vnode == NULL) { in UartDevRelease() 76 if (filep == NULL || filep->f_vnode == NULL) { in UartDevRead() 106 if (filep == NULL || filep->f_vnode == NULL) { in UartDevWrite() 160 if (filep == NULL || filep->f_vnode == NULL) { in UartDevIoctl() 197 static int uartdev_poll(struct file *filep, poll_table *table) in uartdev_poll() argument 201 if (filep == NULL || filep->f_vnode == NULL) { in uartdev_poll() [all …]
|
H A D | gpio_dev.c | 41 static int GpioOpen(struct file *filep) in GpioOpen() argument 43 (void)filep; in GpioOpen() 47 static int GpioClose(struct file *filep) in GpioClose() argument 49 (void)filep; in GpioClose() 99 static int GpioIoctl(struct file *filep, int cmd, unsigned long arg) in GpioIoctl() argument 112 if (filep == NULL || filep->f_vnode == NULL || filep->f_vnode->data == NULL) { in GpioIoctl() 117 drvData = (struct drv_data *)filep->f_vnode->data; in GpioIoctl()
|
H A D | i2c_dev.c | 182 struct I2cClient *client = filep->f_priv; in I2cFsRead() 227 struct I2cClient *client = filep->f_priv; in I2cFsWrite() 299 struct I2cClient *client = filep->f_priv; in I2cFsIoctl() 346 static int I2cFsOpen(struct file *filep) in I2cFsOpen() argument 353 if (filep == NULL || filep->f_vnode == NULL || filep->f_vnode->data == NULL) { in I2cFsOpen() 357 drvData = (struct drv_data *)filep->f_vnode->data; in I2cFsOpen() 374 filep->f_priv = client; in I2cFsOpen() 378 static int I2cFsClose(struct file *filep) in I2cFsClose() argument 380 struct I2cClient *client = filep->f_priv; in I2cFsClose() 395 filep->f_priv = NULL; in I2cFsClose() [all …]
|
H A D | spi_dev.c | 42 static struct SpiDev *SpiDevGetDevFromFilep(struct file *filep) in SpiDevGetDevFromFilep() argument 44 if (filep == NULL) { in SpiDevGetDevFromFilep() 49 struct Vnode *vnode = filep->f_vnode; in SpiDevGetDevFromFilep() 59 static int32_t SpiDevOpen(struct file *filep) in SpiDevOpen() argument 63 dev = SpiDevGetDevFromFilep(filep); in SpiDevOpen() 72 static ssize_t SpiDevRead(struct file *filep, char *buf, size_t size) in SpiDevRead() argument 83 dev = SpiDevGetDevFromFilep(filep); in SpiDevRead() 109 static ssize_t SpiDevWrite(struct file *filep, const char *buf, size_t size) in SpiDevWrite() argument 120 dev = SpiDevGetDevFromFilep(filep); in SpiDevWrite() 350 static int32_t SpiDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) in SpiDevIoctl() argument [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/osal/src/ |
H A D | osal_cdev.c | 159 return dev->opsImpl->seek(filep, offset, whence); in OsalCdevSeek() 165 return dev->opsImpl->read(filep, buf, buflen, offset); in OsalCdevRead() 177 return dev->opsImpl->poll(filep, pollTable); in OsalCdevPoll() 183 return dev->opsImpl->ioctl(filep, cmd, arg); in OsalCdevIoctl() 189 return dev->opsImpl->open(dev, filep); in OsalCdevOpen() 195 return dev->opsImpl->release(dev, filep); in OsalCdevRelease() 265 void OsalSetFilePriv(struct file* filep, void* priv) in OsalSetFilePriv() argument 267 if (filep != NULL) { in OsalSetFilePriv() 268 filep->private_data = priv; in OsalSetFilePriv() 271 void* OsalGetFilePriv(struct file* filep) in OsalGetFilePriv() argument [all …]
|
/ohos5.0/drivers/hdf_core/framework/sample/platform/uart/src/ |
H A D | uart_dev_sample.c | 20 static int32_t UartSampleDevOpen(struct file *filep) in UartSampleDevOpen() argument 24 if (filep == NULL || filep->f_vnode == NULL) { in UartSampleDevOpen() 27 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartSampleDevOpen() 37 static int32_t UartSampleRelease(struct file *filep) in UartSampleRelease() argument 41 if (filep == NULL || filep->f_vnode == NULL) { in UartSampleRelease() 44 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartSampleRelease() 59 if (filep == NULL || filep->f_vnode == NULL) { in UartSampleRead() 62 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartSampleRead() 87 if (filep == NULL || filep->f_vnode == NULL) { in UartSampleWrite() 90 struct drv_data *drv = (struct drv_data *)filep->f_vnode->data; in UartSampleWrite() [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/liteos/model/storage/src/mtd/ |
H A D | mtd_char_lite.c | 55 static int MtdCharOpen(FAR struct file *filep) in MtdCharOpen() argument 59 if (filep == NULL || filep->f_vnode == NULL || filep->f_vnode->data == NULL) { in MtdCharOpen() 87 filep->f_pos = 0; in MtdCharOpen() 88 filep->f_priv = (void *)mfi; in MtdCharOpen() 96 static int MtdCharClose(FAR struct file *filep) in MtdCharClose() argument 108 filep->f_priv = NULL; in MtdCharClose() 119 off_t ppos = filep->f_pos; in MtdCharRead() 179 off_t ppos = filep->f_pos; in MtdCharWrite() 260 filep->f_pos += offset; in MtdCharLseek() 282 return filep->f_pos; in MtdCharLseek() [all …]
|
/ohos5.0/drivers/hdf_core/framework/include/osal/ |
H A D | osal_cdev.h | 26 int64_t (*seek)(struct file *filep, int64_t offset, int whence); 27 ssize_t (*read)(struct file *filep, char __user *buffer, size_t buflen, int64_t *offset); 28 ssize_t (*write)(struct file *filep, const char __user *buffer, size_t buflen, int64_t *offset); 29 unsigned int (*poll)(struct file *filep, poll_table *pollTable); 30 long (*ioctl)(struct file *filep, unsigned int cmd, unsigned long arg); 31 int (*open)(struct OsalCdev *cdev, struct file *filep); 32 int (*release)(struct OsalCdev *cdev, struct file *filep); 42 void OsalSetFilePriv(struct file *filep, void *priv); 43 void *OsalGetFilePriv(struct file *filep);
|
/ohos5.0/drivers/liteos/hievent/src/ |
H A D | hievent_driver.c | 88 int HieventOpen(struct file *filep) in HieventOpen() argument 90 (void)filep; in HieventOpen() 94 int HieventClose(struct file *filep) in HieventClose() argument 96 (void)filep; in HieventClose() 165 (void)filep; in HieventRead() 323 static ssize_t HieventWrite(struct file *filep, in HieventWrite() argument 326 (void)filep; in HieventWrite() 330 static int HieventPoll(struct file *filep, poll_table *fds) in HieventPoll() argument 332 (void)filep; in HieventPoll() 339 static int HieventIoctl(struct file *filep, int cmd, unsigned long arg) in HieventIoctl() argument [all …]
|
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/platform/mipi_dsi/ |
H A D | mipi_tx_dev.c | 246 if (filep == NULL) { in GetIdFromFilep() 251 if (filep->private_data == NULL) { in GetIdFromFilep() 256 id = (uint8_t)(filep->private_data); in GetIdFromFilep() 268 if (filep == NULL) { in GetCntlrFromFilep() 280 if (filep == NULL) { in GetSemaFromFilep() 292 if (filep == NULL) { in GetCfgFromFilep() 501 if (filep == NULL || pArg == NULL) { in MipiDsiDevIoctl() 505 cntlr = GetCntlrFromFilep(filep); in MipiDsiDevIoctl() 511 sem = GetSemaFromFilep(filep); in MipiDsiDevIoctl() 550 (void)filep; in MipiDsiDevOpen() [all …]
|
/ohos5.0/drivers/hdf_core/framework/core/adapter/vnode/src/ |
H A D | hdf_vnode_adapter.c | 565 static long HdfVNodeAdapterIoctl(struct file *filep, unsigned int cmd, unsigned long arg) in HdfVNodeAdapterIoctl() argument 567 struct HdfVNodeAdapterClient *client = (struct HdfVNodeAdapterClient *)OsalGetFilePriv(filep); in HdfVNodeAdapterIoctl() 648 int HdfVNodeAdapterOpen(struct OsalCdev *cdev, struct file *filep) in HdfVNodeAdapterOpen() argument 662 OsalSetFilePriv(filep, client); in HdfVNodeAdapterOpen() 675 static unsigned int HdfVNodeAdapterPoll(struct file *filep, poll_table *wait) in HdfVNodeAdapterPoll() argument 678 struct HdfVNodeAdapterClient *client = (struct HdfVNodeAdapterClient *)OsalGetFilePriv(filep); in HdfVNodeAdapterPoll() 683 poll_wait(filep, &client->pollWait, wait); in HdfVNodeAdapterPoll() 700 static int HdfVNodeAdapterClose(struct OsalCdev *cdev, struct file *filep) in HdfVNodeAdapterClose() argument 704 client = (struct HdfVNodeAdapterClient *)OsalGetFilePriv(filep); in HdfVNodeAdapterClose() 710 OsalSetFilePriv(filep, NULL); in HdfVNodeAdapterClose()
|
/ohos5.0/drivers/hdf_core/framework/support/platform/include/uart/ |
H A D | uart_core.h | 44 int32_t (*pollEvent)(struct UartHost *host, void *filep, void *table); 136 static inline int32_t UartHostPollEvent(struct UartHost *host, void *filep, void *table) in UartHostPollEvent() argument 141 return host->method->pollEvent(host, filep, table); in UartHostPollEvent()
|
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/platform/mipi_csi/ |
H A D | mipi_csi_dev.c | 227 static long MipiRxIoctl(struct file *filep, unsigned int cmd, unsigned long arg) in MipiRxIoctl() argument 236 (void)filep; in MipiRxIoctl() 292 static long MipiRxCompatIoctl(struct file *filep, unsigned int cmd, unsigned long arg) in MipiRxCompatIoctl() argument 294 return MipiRxIoctl(filep, cmd, arg); in MipiRxCompatIoctl() 1138 static int MipiRxOpen(struct inode *inode, struct file *filep) in MipiRxOpen() argument 1141 (void)filep; in MipiRxOpen() 1149 static int MipiRxRelease(struct inode *inode, struct file *filep) in MipiRxRelease() argument 1152 (void)filep; in MipiRxRelease()
|
/ohos5.0/docs/zh-cn/device-dev/driver/ |
H A D | driver-platform-uart-develop.md | 84 int32_t (*pollEvent)(struct UartHost *host, void *filep, void *table); 101 | PollEvent | host:结构体指针,核心层UART控制器<br>filep:void类型指针filep<br>table:void类型指针table | 无 | HDF_STATUS相…
|
/ohos5.0/drivers/hdf_core/adapter/platform/uart/ |
H A D | uart_gr5xx.c | 476 static int32_t UartHostDevPollEvent(struct UartHost *host, void *filep, void *table) in UartHostDevPollEvent() argument 481 (void)filep; in UartHostDevPollEvent()
|
/ohos5.0/docs/en/device-dev/driver/ |
H A D | driver-platform-uart-develop.md | 80 int32_t (*pollEvent)(struct UartHost *host, void *filep, void *table); 97 | PollEvent | **host**: structure pointer to the UART controller at the core layer.<br>**filep**: v…
|