14#ifndef ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_H_ 
   15#define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_H_ 
   39#define CLOCK_CONTROL_SUBSYS_ALL        NULL 
  129        return api->
on(dev, sys);
 
  148        return api->
off(dev, sys);
 
  227        return api->
get_rate(dev, sys, rate);
 
  257        return api->
set_rate(dev, sys, rate);
 
static int clock_control_get_rate(const struct device *dev, clock_control_subsys_t sys, uint32_t *rate)
Obtain the clock rate of given sub-system.
Definition: clock_control.h:216
 
static int clock_control_async_on(const struct device *dev, clock_control_subsys_t sys, clock_control_cb_t cb, void *user_data)
Request clock to start with notification when clock has been started.
Definition: clock_control.h:168
 
void * clock_control_subsys_rate_t
Definition: clock_control.h:64
 
enum clock_control_status(* clock_control_get_status_fn)(const struct device *dev, clock_control_subsys_t sys)
Definition: clock_control.h:88
 
int(* clock_control_async_on_fn)(const struct device *dev, clock_control_subsys_t sys, clock_control_cb_t cb, void *user_data)
Definition: clock_control.h:83
 
void(* clock_control_cb_t)(const struct device *dev, clock_control_subsys_t subsys, void *user_data)
Callback called on clock started.
Definition: clock_control.h:72
 
int(* clock_control_configure_fn)(const struct device *dev, clock_control_subsys_t sys, void *data)
Definition: clock_control.h:96
 
static enum clock_control_status clock_control_get_status(const struct device *dev, clock_control_subsys_t sys)
Get clock status.
Definition: clock_control.h:191
 
static int clock_control_set_rate(const struct device *dev, clock_control_subsys_t sys, clock_control_subsys_rate_t rate)
Set the rate of the clock controlled by the device.
Definition: clock_control.h:246
 
int(* clock_control_get)(const struct device *dev, clock_control_subsys_t sys, uint32_t *rate)
Definition: clock_control.h:79
 
int(* clock_control)(const struct device *dev, clock_control_subsys_t sys)
Definition: clock_control.h:76
 
int(* clock_control_set)(const struct device *dev, clock_control_subsys_t sys, clock_control_subsys_rate_t rate)
Definition: clock_control.h:92
 
void * clock_control_subsys_t
Definition: clock_control.h:56
 
clock_control_status
Current clock status.
Definition: clock_control.h:44
 
static int clock_control_off(const struct device *dev, clock_control_subsys_t sys)
Disable a clock controlled by the device.
Definition: clock_control.h:142
 
static int clock_control_on(const struct device *dev, clock_control_subsys_t sys)
Enable a clock controlled by the device.
Definition: clock_control.h:123
 
static int clock_control_configure(const struct device *dev, clock_control_subsys_t sys, void *data)
Configure a source clock.
Definition: clock_control.h:282
 
@ CLOCK_CONTROL_STATUS_ON
Definition: clock_control.h:47
 
@ CLOCK_CONTROL_STATUS_OFF
Definition: clock_control.h:46
 
@ CLOCK_CONTROL_STATUS_UNKNOWN
Definition: clock_control.h:48
 
@ CLOCK_CONTROL_STATUS_STARTING
Definition: clock_control.h:45
 
#define ENOSYS
Definition: errno.h:83
 
Single-linked list implementation.
 
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
 
Definition: clock_control.h:100
 
clock_control_set set_rate
Definition: clock_control.h:106
 
clock_control on
Definition: clock_control.h:101
 
clock_control_get_status_fn get_status
Definition: clock_control.h:105
 
clock_control off
Definition: clock_control.h:102
 
clock_control_async_on_fn async_on
Definition: clock_control.h:103
 
clock_control_get get_rate
Definition: clock_control.h:104
 
clock_control_configure_fn configure
Definition: clock_control.h:107
 
Runtime device structure (in ROM) per driver instance.
Definition: device.h:378
 
const void * api
Definition: device.h:384
 
static fdata_t data[2]
Definition: test_fifo_contexts.c:15
 
static const intptr_t user_data[5]
Definition: main.c:588