mirror of
https://github.com/openharmony/drivers_framework.git
synced 2026-07-19 16:24:45 -04:00
!35 open source of hisi platform drivers
Merge pull request !35 from NickYang/master
This commit is contained in:
@@ -41,7 +41,8 @@ struct UartHostMethod {
|
||||
int32_t (*SetBaud)(struct UartHost *host, uint32_t baudRate);
|
||||
int32_t (*GetAttribute)(struct UartHost *host, struct UartAttribute *attribute);
|
||||
int32_t (*SetAttribute)(struct UartHost *host, struct UartAttribute *attribute);
|
||||
int32_t (*SetTransMode)(struct UartHost *handle, enum UartTransMode mode);
|
||||
int32_t (*SetTransMode)(struct UartHost *host, enum UartTransMode mode);
|
||||
int32_t (*pollEvent)(struct UartHost *host, void *filep, void *table);
|
||||
};
|
||||
|
||||
struct UartHost *UartHostCreate(struct HdfDeviceObject *device);
|
||||
@@ -133,6 +134,14 @@ static inline int32_t UartHostSetTransMode(struct UartHost *host, enum UartTrans
|
||||
return host->method->SetTransMode(host, mode);
|
||||
}
|
||||
|
||||
static inline int32_t UartHostPollEvent(struct UartHost *host, void *filep, void *table)
|
||||
{
|
||||
if (host == NULL || host->method == NULL || host->method->pollEvent == NULL) {
|
||||
return HDF_ERR_NOT_SUPPORT;
|
||||
}
|
||||
return host->method->pollEvent(host, filep, table);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user