This is a implementation of a sample driver. This Driver interface has no function and is only for demonstration how to write a new driver interface and implement a driver.
Use a Instance of the driver:
#include <devs.h>
struct example *ex1;
struct example *ex2;
int32_t ret;
CONFIG_ASSERT(ex1 != NULL);
CONFIG_ASSERT(ex1 != NULL);
CONFIG_ASSERT(ret >= 0);
CONFIG_ASSERT(ret >= 0);
◆ example_deinit()
int32_t example_deinit |
( |
struct example * |
example | ) |
|
|
inline |
Deinit Driver Instants
- Parameters
-
- Returns
- 0 on ok -1 on failure
◆ example_funcname()
int32_t example_funcname |
( |
struct example * |
example, |
|
|
uint32_t |
params |
|
) |
| |
|
inline |
Sample Function for a driver
- Parameters
-
example | Instant |
params | sample param |
- Returns
- 0 on ok -1 on error
◆ example_init()
struct example* example_init |
( |
uint32_t |
index | ) |
|
|
inline |
Init Function
- Parameters
-
- Returns
- Example Instants or NULL