Home
last modified time | relevance | path

Searched refs:host (Results 1 – 25 of 134) sorted by relevance

123456

/drivers/hdf_core/framework/support/platform/src/rtc/
Drtc_core.c16 int32_t RtcHostReadTime(struct RtcHost *host, struct RtcTime *time) in RtcHostReadTime() argument
18 if (host == NULL || time == NULL) { in RtcHostReadTime()
23 if (host->method == NULL || host->method->ReadTime == NULL) { in RtcHostReadTime()
28 return host->method->ReadTime(host, time); in RtcHostReadTime()
31 int32_t RtcHostWriteTime(struct RtcHost *host, const struct RtcTime *time) in RtcHostWriteTime() argument
33 if (host == NULL || time == NULL) { in RtcHostWriteTime()
38 if (host->method == NULL || host->method->WriteTime == NULL) { in RtcHostWriteTime()
43 return host->method->WriteTime(host, time); in RtcHostWriteTime()
46 int32_t RtcHostReadAlarm(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, struct RtcTime *time) in RtcHostReadAlarm() argument
48 if (host == NULL || time == NULL) { in RtcHostReadAlarm()
[all …]
Drtc_service.c20 static int32_t RtcServiceIoReadTime(struct RtcHost *host, struct HdfSBuf *reply) in RtcServiceIoReadTime() argument
25 ret = RtcHostReadTime(host, &time); in RtcServiceIoReadTime()
39 static int32_t RtcServiceIoWriteTime(struct RtcHost *host, struct HdfSBuf *data) in RtcServiceIoWriteTime() argument
50 ret = RtcHostWriteTime(host, time); in RtcServiceIoWriteTime()
59 static int32_t RtcServiceIoReadAlarm(struct RtcHost *host, struct HdfSBuf *data, struct HdfSBuf *re… in RtcServiceIoReadAlarm() argument
70 ret = RtcHostReadAlarm(host, (enum RtcAlarmIndex)alarmIndex, &time); in RtcServiceIoReadAlarm()
84 static int32_t RtcServiceIoWriteAlarm(struct RtcHost *host, struct HdfSBuf *data) in RtcServiceIoWriteAlarm() argument
101 ret = RtcHostWriteAlarm(host, (enum RtcAlarmIndex)alarmIndex, time); in RtcServiceIoWriteAlarm()
112 struct RtcHost *host = NULL; in RtcAlarmServiceCallback() local
116 host = (struct RtcHost *)DevSvcManagerClntGetService("HDF_PLATFORM_RTC"); in RtcAlarmServiceCallback()
[all …]
/drivers/hdf_core/framework/support/platform/include/uart/
Duart_core.h35 int32_t (*Init)(struct UartHost *host);
36 int32_t (*Deinit)(struct UartHost *host);
37 int32_t (*Read)(struct UartHost *host, uint8_t *data, uint32_t size);
38 int32_t (*Write)(struct UartHost *host, uint8_t *data, uint32_t size);
39 int32_t (*GetBaud)(struct UartHost *host, uint32_t *baudRate);
40 int32_t (*SetBaud)(struct UartHost *host, uint32_t baudRate);
41 int32_t (*GetAttribute)(struct UartHost *host, struct UartAttribute *attribute);
42 int32_t (*SetAttribute)(struct UartHost *host, struct UartAttribute *attribute);
43 int32_t (*SetTransMode)(struct UartHost *host, enum UartTransMode mode);
44 int32_t (*pollEvent)(struct UartHost *host, void *filep, void *table);
[all …]
/drivers/hdf_core/framework/support/platform/src/uart/
Duart_core.c16 int32_t UartHostRequest(struct UartHost *host) in UartHostRequest() argument
20 if (host == NULL) { in UartHostRequest()
25 if (host->method == NULL || host->method->Init == NULL) { in UartHostRequest()
30 if (OsalAtomicIncReturn(&host->atom) > 1) { in UartHostRequest()
32 OsalAtomicDec(&host->atom); in UartHostRequest()
36 ret = host->method->Init(host); in UartHostRequest()
39 OsalAtomicDec(&host->atom); in UartHostRequest()
46 int32_t UartHostRelease(struct UartHost *host) in UartHostRelease() argument
50 if (host == NULL) { in UartHostRelease()
55 if (host->method == NULL || host->method->Deinit == NULL) { in UartHostRelease()
[all …]
Duart_service.c17 static int32_t UartIoRead(struct UartHost *host, struct HdfSBuf *data, struct HdfSBuf *reply) in UartIoRead() argument
39 ret = UartHostRead(host, buf, len); in UartIoRead()
56 static int32_t UartIoWrite(struct UartHost *host, struct HdfSBuf *data) in UartIoWrite() argument
65 return UartHostWrite(host, buf, size); in UartIoWrite()
68 static int32_t UartIoGetBaud(struct UartHost *host, struct HdfSBuf *reply) in UartIoGetBaud() argument
73 ret = UartHostGetBaud(host, &baudRate); in UartIoGetBaud()
85 static int32_t UartIoSetBaud(struct UartHost *host, struct HdfSBuf *data) in UartIoSetBaud() argument
93 return UartHostSetBaud(host, baudRate); in UartIoSetBaud()
96 static int32_t UartIoGetAttribute(struct UartHost *host, struct HdfSBuf *reply) in UartIoGetAttribute() argument
101 ret = UartHostGetAttribute(host, &attribute); in UartIoGetAttribute()
[all …]
/drivers/hdf_core/framework/test/unittest/platform/virtual/
Dpcie_virtual.c76 struct PcieVirtualAdapterHost *host = (struct PcieVirtualAdapterHost *)cntlr; in PcieVirtualAdapterDmaMap() local
78 if (host == NULL) { in PcieVirtualAdapterDmaMap()
86 if (host->dmaData != 0) { in PcieVirtualAdapterDmaMap()
90 host->dmaData = addr; in PcieVirtualAdapterDmaMap()
91 host->len = len; in PcieVirtualAdapterDmaMap()
92 host->dir = dir; in PcieVirtualAdapterDmaMap()
99 struct PcieVirtualAdapterHost *host = (struct PcieVirtualAdapterHost *)cntlr; in PcieVirtualAdapterDmaUnmap() local
101 if (host == NULL || dir > PCIE_VIRTUAL_DIR_MAX) { in PcieVirtualAdapterDmaUnmap()
105 if (addr != host->dmaData || len != host->len || dir != host->dir) { in PcieVirtualAdapterDmaUnmap()
109 host->dmaData = 0; in PcieVirtualAdapterDmaUnmap()
[all …]
/drivers/hdf_core/framework/support/platform/include/rtc/
Drtc_core.h34 int32_t (*ReadTime)(struct RtcHost *host, struct RtcTime *time);
35 int32_t (*WriteTime)(struct RtcHost *host, const struct RtcTime *time);
36 int32_t (*ReadAlarm)(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, struct RtcTime *time);
37 …int32_t (*WriteAlarm)(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, const struct RtcTime *t…
38 …int32_t (*RegisterAlarmCallback)(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, RtcAlarmCall…
39 …int32_t (*AlarmInterruptEnable)(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, uint8_t enabl…
40 int32_t (*GetFreq)(struct RtcHost *host, uint32_t *freq);
41 int32_t (*SetFreq)(struct RtcHost *host, uint32_t freq);
42 int32_t (*Reset)(struct RtcHost *host);
43 int32_t (*ReadReg)(struct RtcHost *host, uint8_t usrDefIndex, uint8_t *value);
[all …]
/drivers/hdf_core/framework/sample/platform/uart/src/
Duart_dev_sample.c22 struct UartHost *host = NULL; in UartSampleDevOpen() local
28 host = (struct UartHost *)drv->priv; in UartSampleDevOpen()
29 if (host == NULL) { in UartSampleDevOpen()
33 HDF_LOGI("%s: open uart%d success", __func__, host->num); in UartSampleDevOpen()
39 struct UartHost *host = NULL; in UartSampleRelease() local
45 host = (struct UartHost *)drv->priv; in UartSampleRelease()
46 if (host == NULL) { in UartSampleRelease()
50 HDF_LOGI("%s: close uart%d success", __func__, host->num); in UartSampleRelease()
57 struct UartHost *host = NULL; in UartSampleRead() local
63 host = (struct UartHost *)drv->priv; in UartSampleRead()
[all …]
Duart_sample.c44 static int32_t SampleUartHostInit(struct UartHost *host);
45 static int32_t SampleUartHostDeinit(struct UartHost *host);
46 static int32_t SampleUartHostWrite(struct UartHost *host, uint8_t *data, uint32_t size);
47 static int32_t SampleUartHostSetBaud(struct UartHost *host, uint32_t baudRate);
48 static int32_t SampleUartHostGetBaud(struct UartHost *host, uint32_t *baudRate);
64 static int32_t SampleUartHostInit(struct UartHost *host) in SampleUartHostInit() argument
67 if (host == NULL) { in SampleUartHostInit()
74 static int32_t SampleUartHostDeinit(struct UartHost *host) in SampleUartHostDeinit() argument
77 if (host == NULL) { in SampleUartHostDeinit()
84 static int32_t SampleUartHostWrite(struct UartHost *host, uint8_t *data, uint32_t size) in SampleUartHostWrite() argument
[all …]
/drivers/hdf_core/adapter/khdf/liteos/platform/src/
Duart_dev.c44 struct UartHost *host = NULL; in UartDevOpen() local
51 host = (struct UartHost *)drv->priv; in UartDevOpen()
52 return UartHostRequest(host); in UartDevOpen()
57 struct UartHost *host = NULL; in UartDevRelease() local
64 host = (struct UartHost *)drv->priv; in UartDevRelease()
66 return UartHostRelease(host); in UartDevRelease()
74 struct UartHost *host = NULL; in UartDevRead() local
81 host = (struct UartHost *)drv->priv; in UartDevRead()
89 size = UartHostRead(host, tmpBuf, count); in UartDevRead()
96 return UartHostRead(host, (uint8_t *)buf, count); in UartDevRead()
[all …]
/drivers/hdf_core/adapter/uhdf2/host/
DBUILD.gn27 "$hdf_interfaces_path/inner_api/host/shared",
28 "$hdf_interfaces_path/inner_api/host/uhdf",
44 "$hdf_framework_path/core/host/include",
47 "$hdf_uhdf_path/include/host",
57 "$hdf_framework_path/core/host/src/devhost_service.c",
58 "$hdf_framework_path/core/host/src/devmgr_service_clnt.c",
59 "$hdf_framework_path/core/host/src/devsvc_manager_clnt.c",
60 "$hdf_framework_path/core/host/src/hdf_device.c",
61 "$hdf_framework_path/core/host/src/hdf_device_node.c",
62 "$hdf_framework_path/core/host/src/hdf_device_object.c",
[all …]
/drivers/hdf_core/framework/core/shared/include/
Dhdf_attribute_macro.h43 #define HDF_DEAL_DEVICE_NODE(node, deviceNodes, host, retCode) \ argument
48 AttributeManagerFreeHost(host); \
62 #define HDF_DEAL_DEVICE(node, devices, host, retCode) \ argument
67 AttributeManagerFreeHost(host); \
71 node##_foreach_child_vargs(HDF_DEAL_DEVICE_NODE, device->deviceNodes, host, retCode); \
75 #define HDF_FIND_HOST(node, name, host, retCode) \ argument
78 (host)->devHostName = HCS_PROP(node, hostName); \
79 (host)->priority = HCS_PROP(node, priority); \
80 node##_foreach_child_vargs(HDF_DEAL_DEVICE, (host)->devices, host, retCode); \
86 host = (struct HdfHostType *)OsalMemCalloc(sizeof(*host)); \
[all …]
/drivers/hdf_core/adapter/platform/pwm/
Dpwm_wm.c99 static int32_t AttachPwmDevice(struct PwmDev *host, const struct HdfDeviceObject *device) in AttachPwmDevice() argument
103 if (device == NULL || device->property == NULL || host == NULL) { in AttachPwmDevice()
120 host->priv = pwmDevice; in AttachPwmDevice()
144 struct PwmDev *host = NULL; in PwmDriverInit() local
153 host = (struct PwmDev *)OsalMemAlloc(sizeof(struct PwmDev)); in PwmDriverInit()
154 if (host == NULL) { in PwmDriverInit()
159 ret = AttachPwmDevice(host, device); in PwmDriverInit()
161 OsalMemFree(host); in PwmDriverInit()
166 host->method = &g_pwmmethod; in PwmDriverInit()
167 ret = PwmDeviceAdd(device, host); in PwmDriverInit()
[all …]
Dpwm_bes.c59 static int InitPwmDevice(const struct PwmDev *host) in InitPwmDevice() argument
64 if (host == NULL || host->priv == NULL) { in InitPwmDevice()
68 pwmDevice = (struct PwmDevice *)host->priv; in InitPwmDevice()
154 static int32_t AttachPwmDevice(struct PwmDev *host, const struct HdfDeviceObject *device) argument
159 if (device == NULL || host == NULL) {
161 if (device == NULL || device->property == NULL || host == NULL) {
182 host->priv = pwmDevice;
183 host->num = pwmDevice->resource.pwmId;
185 return InitPwmDevice(host);
223 struct PwmDev *host = NULL; local
[all …]
/drivers/hdf_core/adapter/platform/uart/
Duart_wm.c209 static int32_t UartHostDevInit(struct UartHost *host);
210 static int32_t UartHostDevDeinit(struct UartHost *host);
211 static int32_t UartHostDevWrite(struct UartHost *host, uint8_t *data, uint32_t size);
212 static int32_t UartHostDevSetBaud(struct UartHost *host, uint32_t baudRate);
213 static int32_t UartHostDevGetBaud(struct UartHost *host, uint32_t *baudRate);
214 static int32_t UartHostDevRead(struct UartHost *host, uint8_t *data, uint32_t size);
215 static int32_t UartHostDevSetAttribute(struct UartHost *host, struct UartAttribute *attribute);
216 static int32_t UartHostDevGetAttribute(struct UartHost *host, struct UartAttribute *attribute);
217 static int32_t UartHostDevSetTransMode(struct UartHost *host, enum UartTransMode mode);
232 static int InitUartDevice(struct UartHost *host) in InitUartDevice() argument
[all …]
Duart_gr5xx.c175 static int32_t UartHostDevRead(struct UartHost *host, uint8_t *data, uint32_t size) in UartHostDevRead() argument
181 if ((host == NULL) || (host->priv == NULL) || (data == NULL)) { in UartHostDevRead()
185 udd = (struct UartDriverData *)host->priv; in UartHostDevRead()
214 static int32_t UartHostDevWrite(struct UartHost *host, uint8_t *data, uint32_t size) in UartHostDevWrite() argument
219 if ((host == NULL) || (host->priv == NULL) || (data == NULL)) { in UartHostDevWrite()
223 udd = (struct UartDriverData *)host->priv; in UartHostDevWrite()
241 static int32_t UartHostDevGetBaud(struct UartHost *host, uint32_t *baudRate) in UartHostDevGetBaud() argument
245 if (host == NULL || host->priv == NULL || baudRate == NULL) { in UartHostDevGetBaud()
250 udd = (struct UartDriverData *)host->priv; in UartHostDevGetBaud()
260 static int32_t UartHostDevSetBaud(struct UartHost *host, uint32_t baudRate) in UartHostDevSetBaud() argument
[all …]
Duart_asr.c228 static int32_t UartHostDevRead(struct UartHost *host, uint8_t *data, uint32_t size) in UartHostDevRead() argument
235 if ((host == NULL) || (host->priv == NULL) || (data == NULL)) { in UartHostDevRead()
239 udd = (struct UartDriverData *)host->priv; in UartHostDevRead()
266 static int32_t UartHostDevWrite(struct UartHost *host, uint8_t *data, uint32_t size) in UartHostDevWrite() argument
271 if ((host == NULL) || (host->priv == NULL) || (data == NULL)) { in UartHostDevWrite()
275 udd = (struct UartDriverData *)host->priv; in UartHostDevWrite()
293 static int32_t UartHostDevGetBaud(struct UartHost *host, uint32_t *baudRate) in UartHostDevGetBaud() argument
297 if (host == NULL || host->priv == NULL || baudRate == NULL) { in UartHostDevGetBaud()
302 udd = (struct UartDriverData *)host->priv; in UartHostDevGetBaud()
312 static int32_t UartHostDevSetBaud(struct UartHost *host, uint32_t baudRate) in UartHostDevSetBaud() argument
[all …]
Duart_stm32f4xx.c302 static int32_t UartHostDevInit(struct UartHost *host);
303 static int32_t UartHostDevDeinit(struct UartHost *host);
304 static int32_t UartHostDevWrite(struct UartHost *host, uint8_t *data, uint32_t size);
305 static int32_t UartHostDevSetBaud(struct UartHost *host, uint32_t baudRate);
306 static int32_t UartHostDevGetBaud(struct UartHost *host, uint32_t *baudRate);
307 static int32_t UartHostDevRead(struct UartHost *host, uint8_t *data, uint32_t size);
308 static int32_t UartHostDevSetAttribute(struct UartHost *host, struct UartAttribute *attribute);
309 static int32_t UartHostDevGetAttribute(struct UartHost *host, struct UartAttribute *attribute);
310 static int32_t UartHostDevSetTransMode(struct UartHost *host, enum UartTransMode mode);
324 static int InitUartDevice(struct UartHost *host) in InitUartDevice() argument
[all …]
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/resources/templates/lite/
Dhdf_driver_manager_config.template4 template host {
19 platform :: host {
22 display :: host {
25 network :: host {
28 storage :: host {
31 media :: host {
34 common :: host {
DLiteos_Device_Info_Hcs.template1 ${driver_name} :: host{
2 hostName = "${driver_name}_host"; // host���ƣ�host�ڵ����������ijһ������������
3 priority = 100; // host�������ȼ���0-200����ֵԽ�����ȼ�Խ�ͣ�����Ĭ����100�����ȼ���ͬ����֤host�ļ���˳��
/drivers/hdf_core/adapter/khdf/linux/platform/rtc/
Drtc_adapter.c67 static int32_t HiRtcReadTime(struct RtcHost *host, struct RtcTime *hdfTime) in HiRtcReadTime() argument
73 (void)host; in HiRtcReadTime()
87 static int32_t HiRtcWriteTime(struct RtcHost *host, const struct RtcTime *hdfTime) in HiRtcWriteTime() argument
93 (void)host; in HiRtcWriteTime()
108 static int32_t HiReadAlarm(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, struct RtcTime *hdf… in HiReadAlarm() argument
114 (void)host; in HiReadAlarm()
130 static int32_t HiWriteAlarm(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, const struct RtcTi… in HiWriteAlarm() argument
136 (void)host; in HiWriteAlarm()
155 static int32_t HiAlarmInterruptEnable(struct RtcHost *host, enum RtcAlarmIndex alarmIndex, uint8_t … in HiAlarmInterruptEnable() argument
160 (void)host; in HiAlarmInterruptEnable()
[all …]
/drivers/hdf_core/adapter/khdf/linux/platform/uart/
Duart_adapter.c39 static int32_t UartAdapterInit(struct UartHost *host) in UartAdapterInit() argument
45 if (host == NULL) { in UartAdapterInit()
49 if (sprintf_s(name, UART_PATHNAME_LEN - 1, "/dev/%s%d", g_driverName, host->num) < 0) { in UartAdapterInit()
61 host->priv = fp; in UartAdapterInit()
65 static int32_t UartAdapterDeInit(struct UartHost *host) in UartAdapterDeInit() argument
70 if (host == NULL) { in UartAdapterDeInit()
74 fp = (struct file *)host->priv; in UartAdapterDeInit()
81 host->priv = NULL; in UartAdapterDeInit()
85 static int32_t UartAdapterRead(struct UartHost *host, uint8_t *data, uint32_t size) in UartAdapterRead() argument
94 if (host == NULL || host->priv == NULL || data == NULL || size == 0) { in UartAdapterRead()
[all …]
/drivers/peripheral/usb/ddk/
DBUILD.gn30 "host/include",
33 "./../interfaces/ddk/host",
36 "host/src/linux_adapter.c",
37 "host/src/usb_interface_pool.c",
38 "host/src/usb_io_manage.c",
39 "host/src/usb_protocol.c",
40 "host/src/usb_raw_api.c",
41 "host/src/usb_raw_api_library.c",
71 "host/include",
78 "host/src/ddk_device_manager.c",
[all …]
/drivers/hdf_core/framework/core/common/src/
Dhdf_attribute_macro.c50 struct HdfHostType *host = NULL; in AttributeManagerFreeDevHost() local
53 DLIST_FOR_EACH_ENTRY_SAFE(host, hostTemp, &hostMgr->hosts, struct HdfHostType, hostEntry) { in AttributeManagerFreeDevHost()
54 OsalMemFree(host); in AttributeManagerFreeDevHost()
62 struct HdfHostType *host = NULL; in HdfAttributeManagerGetHostList() local
78 DLIST_FOR_EACH_ENTRY(host, &devHost->hosts, struct HdfHostType, hostEntry) { in HdfAttributeManagerGetHostList()
86 if (!GetHostInfoMacro(host, hostInfo)) { in HdfAttributeManagerGetHostList()
184 static void AttributeManagerFreeHost(struct HdfHostType *host) in AttributeManagerFreeHost() argument
191 … DLIST_FOR_EACH_ENTRY_SAFE(device, deviceTemp, &host->devices, struct HdfDeviceType, deviceEntry) { in AttributeManagerFreeHost()
198 OsalMemFree(host); in AttributeManagerFreeHost()
203 struct HdfHostType *host = NULL; in HdfAttributeManagerGetDeviceList() local
[all …]
/drivers/hdf_core/adapter/uhdf2/test/unittest/load_vdi/
DBUILD.gn20 include_dirs = [ "../../../../../framework/core/host/test/sample" ]
23 [ "../../../../../framework/core/host/test/unittest/hdf_vdi_test.cpp" ]
33 "../../../host:libhdf_host",
43 include_dirs = [ "../../../../../framework/core/host/test/sample" ]
46 [ "../../../../../framework/core/host/test/sample/vdi_sample1_driver.c" ]
51 "../../../host:libhdf_host",
58 include_dirs = [ "../../../../../framework/core/host/test/sample" ]
61 [ "../../../../../framework/core/host/test/sample/vdi_sample1_symbol.c" ]
66 "../../../host:libhdf_host",
73 include_dirs = [ "../../../../../framework/core/host/test/sample" ]
[all …]

123456