RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
platform.h
浏览该文件的文档.
1/*
2 * Copyright (c) 2006-2021, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date Author Notes
8 * 2023-04-12 ErikChan the first version
9 * 2023-10-13 zmshahaha distinguish ofw and none-ofw situation
10 */
11
12#ifndef __PLATFORM_H__
13#define __PLATFORM_H__
14
15#include <drivers/ofw.h>
16#include <drivers/core/driver.h>
17
19{
21
22 int dev_id;
23
24 const char *name;
25 const struct rt_ofw_node_id *id;
26
27 void *priv;
28};
29
31{
32 struct rt_driver parent;
33
34 const char *name;
35 const struct rt_ofw_node_id *ids;
36
40};
41
43
46
50
51#define RT_PLATFORM_DRIVER_EXPORT(driver) RT_DRIVER_EXPORT(driver, platform, BUILIN)
52
53#endif /* __PLATFORM_H__ */
rt_err_t rt_platform_ofw_free(struct rt_platform_device *pdev)
rt_err_t rt_platform_device_register(struct rt_platform_device *pdev)
struct rt_platform_device * rt_platform_device_alloc(const char *name)
rt_err_t rt_platform_ofw_request(struct rt_ofw_node *np)
rt_err_t rt_platform_ofw_device_probe_child(struct rt_ofw_node *np)
rt_err_t rt_platform_driver_register(struct rt_platform_driver *pdrv)
rt_base_t rt_err_t
const struct rt_ofw_node_id * id
struct rt_device parent
const struct rt_ofw_node_id * ids
rt_err_t(* remove)(struct rt_platform_device *pdev)
struct rt_driver parent
rt_err_t(* probe)(struct rt_platform_device *pdev)
rt_err_t(* shutdown)(struct rt_platform_device *pdev)