Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Clock Control (SF32LB specifics)

Clock Control (SF32LB specifics) More...

Data Structures

struct  sf32lb_clock_dt_spec
 SF32LB Clock DT spec. More...

Macros

#define SF32LB_CLOCK_DT_SPEC_GET(node_id)
 Initialize a sf32lb_clock_dt_spec structure from a DT node.
#define SF32LB_CLOCK_DT_SPEC_GET_OR(node_id, default_spec)
 Same as SF32LB_CLOCK_DT_SPEC_GET but with a default value.
#define SF32LB_CLOCK_DT_INST_SPEC_GET(index)
 Initialize a sf32lb_clock_dt_spec structure from a DT instance.
#define SF32LB_CLOCK_DT_INST_SPEC_GET_OR(index, default_spec)
 Same as SF32LB_CLOCK_DT_INST_SPEC_GET but with a default value.

Functions

static bool sf3232lb_clock_is_ready_dt (const struct sf32lb_clock_dt_spec *spec)
 Check if the clock device is ready.
static int sf32lb_clock_control_on_dt (const struct sf32lb_clock_dt_spec *spec)
 Turn on a clock using a sf32lb_clock_dt_spec structure.
static int sf32lb_clock_control_off_dt (const struct sf32lb_clock_dt_spec *spec)
 Turn off a clock using a sf32lb_clock_dt_spec structure.

Detailed Description

Clock Control (SF32LB specifics)

Macro Definition Documentation

◆ SF32LB_CLOCK_DT_INST_SPEC_GET

#define SF32LB_CLOCK_DT_INST_SPEC_GET ( index)

#include <zephyr/drivers/clock_control/sf32lb.h>

Value:
#define SF32LB_CLOCK_DT_SPEC_GET(node_id)
Initialize a sf32lb_clock_dt_spec structure from a DT node.
Definition sf32lb.h:36
#define DT_DRV_INST(inst)
Node identifier for an instance of a DT_DRV_COMPAT compatible.
Definition devicetree.h:4037

Initialize a sf32lb_clock_dt_spec structure from a DT instance.

Parameters
indexDT instance index

◆ SF32LB_CLOCK_DT_INST_SPEC_GET_OR

#define SF32LB_CLOCK_DT_INST_SPEC_GET_OR ( index,
default_spec )

#include <zephyr/drivers/clock_control/sf32lb.h>

Value:
#define SF32LB_CLOCK_DT_SPEC_GET_OR(node_id, default_spec)
Same as SF32LB_CLOCK_DT_SPEC_GET but with a default value.
Definition sf32lb.h:48

Same as SF32LB_CLOCK_DT_INST_SPEC_GET but with a default value.

Parameters
indexDT instance index
default_specDefault value to be used if the node has no clocks property.

◆ SF32LB_CLOCK_DT_SPEC_GET

#define SF32LB_CLOCK_DT_SPEC_GET ( node_id)

#include <zephyr/drivers/clock_control/sf32lb.h>

Value:
{ \
.dev = DEVICE_DT_GET(DT_CLOCKS_CTLR(node_id)), \
.id = DT_CLOCKS_CELL(node_id, id), \
}
#define DEVICE_DT_GET(node_id)
Get a device reference from a devicetree node identifier.
Definition device.h:314
#define DT_CLOCKS_CELL(node_id, cell)
Equivalent to DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell)
Definition clocks.h:254
#define DT_CLOCKS_CTLR(node_id)
Equivalent to DT_CLOCKS_CTLR_BY_IDX(node_id, 0)
Definition clocks.h:147

Initialize a sf32lb_clock_dt_spec structure from a DT node.

Parameters
node_idDT node identifier

◆ SF32LB_CLOCK_DT_SPEC_GET_OR

#define SF32LB_CLOCK_DT_SPEC_GET_OR ( node_id,
default_spec )

#include <zephyr/drivers/clock_control/sf32lb.h>

Value:
(SF32LB_CLOCK_DT_SPEC_GET(node_id)), (default_spec))
#define DT_CLOCKS_HAS_IDX(node_id, idx)
Test if a node has a clocks phandle-array property at a given index.
Definition clocks.h:53
#define COND_CODE_1(_flag, _if_1_code, _else_code)
Insert code depending on whether _flag expands to 1 or not.
Definition util_macro.h:203

Same as SF32LB_CLOCK_DT_SPEC_GET but with a default value.

Parameters
node_idDT node identifier
default_specDefault value to be used if the node has no clocks property.

Function Documentation

◆ sf3232lb_clock_is_ready_dt()

bool sf3232lb_clock_is_ready_dt ( const struct sf32lb_clock_dt_spec * spec)
inlinestatic

#include <zephyr/drivers/clock_control/sf32lb.h>

Check if the clock device is ready.

Parameters
specSF32LB clock DT spec
Returns
true If the clock device is ready.
false If the clock device is not ready.

◆ sf32lb_clock_control_off_dt()

int sf32lb_clock_control_off_dt ( const struct sf32lb_clock_dt_spec * spec)
inlinestatic

#include <zephyr/drivers/clock_control/sf32lb.h>

Turn off a clock using a sf32lb_clock_dt_spec structure.

Parameters
specSF32LB clock DT spec
Returns
See clock_control_off().

◆ sf32lb_clock_control_on_dt()

int sf32lb_clock_control_on_dt ( const struct sf32lb_clock_dt_spec * spec)
inlinestatic

#include <zephyr/drivers/clock_control/sf32lb.h>

Turn on a clock using a sf32lb_clock_dt_spec structure.

Parameters
specSF32LB clock DT spec
Returns
See clock_control_on().