Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
atmel_sam_pmc.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Gerson Fernando Budke <
[email protected]
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
13
#ifndef ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_ATMEL_SAM_PMC_H_
14
#define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_ATMEL_SAM_PMC_H_
15
16
#include <
zephyr/drivers/clock_control.h
>
17
#include <
zephyr/dt-bindings/clock/atmel_sam_pmc.h
>
18
24
26
#define SAM_DT_PMC_CONTROLLER DEVICE_DT_GET(DT_NODELABEL(pmc))
27
29
struct
atmel_sam_pmc_config
{
30
uint32_t
clock_type
;
31
uint32_t
peripheral_id
;
32
};
33
40
#define SAM_DT_CLOCK_PMC_CFG(clock_id, node_id) \
41
{ \
42
.clock_type = DT_CLOCKS_CELL_BY_IDX(node_id, clock_id, clock_type), \
43
.peripheral_id = DT_CLOCKS_CELL_BY_IDX(node_id, clock_id, peripheral_id)\
44
}
45
51
#define SAM_DT_INST_CLOCK_PMC_CFG(inst) SAM_DT_CLOCK_PMC_CFG(0, DT_DRV_INST(inst))
52
58
#define SAM_DT_CLOCKS_PMC_CFG(node_id) \
59
{ \
60
LISTIFY(DT_NUM_CLOCKS(node_id), \
61
SAM_DT_CLOCK_PMC_CFG, (,), node_id) \
62
}
63
69
#define SAM_DT_INST_CLOCKS_PMC_CFG(inst) \
70
SAM_DT_CLOCKS_PMC_CFG(DT_DRV_INST(inst))
71
73
74
#endif
/* ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_ATMEL_SAM_PMC_H_ */
clock_control.h
Main header file for clock control driver API.
atmel_sam_pmc.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
atmel_sam_pmc_config
PMC clock configuration for a single peripheral clock.
Definition
atmel_sam_pmc.h:29
atmel_sam_pmc_config::clock_type
uint32_t clock_type
Clock type (see atmel_sam_pmc.h DT bindings).
Definition
atmel_sam_pmc.h:30
atmel_sam_pmc_config::peripheral_id
uint32_t peripheral_id
Peripheral identifier within the PMC.
Definition
atmel_sam_pmc.h:31
zephyr
drivers
clock_control
atmel_sam_pmc.h
Generated on
for Zephyr API by
1.17.0