Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
abstract_driver.c File Reference
#include <ztest.h>
#include <device.h>
#include "abstract_driver.h"

Macros

#define MY_DRIVER_A   "my_driver_A"
 
#define MY_DRIVER_B   "my_driver_B"
 

Functions

static int my_driver_A_do_this (const struct device *device, int foo, int bar)
 
static void my_driver_A_do_that (const struct device *device, unsigned int *baz)
 
int common_driver_init (const struct device *dev)
 
static int my_driver_B_do_this (const struct device *device, int foo, int bar)
 
static void my_driver_B_do_that (const struct device *device, unsigned int *baz)
 

Variables

static struct subsystem_api my_driver_A_api_funcs
 
static struct subsystem_api my_driver_B_api_funcs
 

Macro Definition Documentation

◆ MY_DRIVER_A

#define MY_DRIVER_A   "my_driver_A"

◆ MY_DRIVER_B

#define MY_DRIVER_B   "my_driver_B"

Function Documentation

◆ common_driver_init()

int common_driver_init ( const struct device dev)

◆ my_driver_A_do_that()

static void my_driver_A_do_that ( const struct device device,
unsigned int *  baz 
)
static

◆ my_driver_A_do_this()

static int my_driver_A_do_this ( const struct device device,
int  foo,
int  bar 
)
static

◆ my_driver_B_do_that()

static void my_driver_B_do_that ( const struct device device,
unsigned int *  baz 
)
static

◆ my_driver_B_do_this()

static int my_driver_B_do_this ( const struct device device,
int  foo,
int  bar 
)
static

Variable Documentation

◆ my_driver_A_api_funcs

struct subsystem_api my_driver_A_api_funcs
static
Initial value:
= {
.do_this = my_driver_A_do_this,
}
static void my_driver_A_do_that(const struct device *device, unsigned int *baz)
Definition: abstract_driver.c:20
static int my_driver_A_do_this(const struct device *device, int foo, int bar)
Definition: abstract_driver.c:15

◆ my_driver_B_api_funcs

struct subsystem_api my_driver_B_api_funcs
static
Initial value:
= {
.do_this = my_driver_B_do_this,
}
static int my_driver_B_do_this(const struct device *device, int foo, int bar)
Definition: abstract_driver.c:37
static void my_driver_B_do_that(const struct device *device, unsigned int *baz)
Definition: abstract_driver.c:42