Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
syscon.h File Reference

Main header file for SYSCON (System Control) driver API. More...

#include <errno.h>
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/syscalls/syscon.h>

Go to the source code of this file.

Data Structures

struct  syscon_driver_api
  Driver Operations SYSCON driver operations More...

Typedefs

typedef int(* syscon_api_get_base) (const struct device *dev, uintptr_t *addr)
 Get the base address of the syscon region.
typedef int(* syscon_api_read_reg) (const struct device *dev, uint16_t reg, uint32_t *val)
 Read a single register.
typedef int(* syscon_api_write_reg) (const struct device *dev, uint16_t reg, uint32_t val)
 Write a single register.
typedef int(* syscon_api_update_bits) (const struct device *dev, uint16_t reg, uint32_t mask, uint32_t val)
 Atomically update bits in a register.
typedef int(* syscon_api_get_size) (const struct device *dev, size_t *size)
 Get the size of the syscon register region.

Functions

int syscon_get_base (const struct device *dev, uintptr_t *addr)
 Get the syscon base address.
int syscon_read_reg (const struct device *dev, uint16_t reg, uint32_t *val)
 Read from syscon register.
int syscon_write_reg (const struct device *dev, uint16_t reg, uint32_t val)
 Write to syscon register.
int syscon_update_bits (const struct device *dev, uint16_t reg, uint32_t mask, uint32_t val)
 Atomically update bits in a syscon register.
int syscon_get_size (const struct device *dev, size_t *size)
 Get the size of the syscon register in bytes.

Detailed Description

Main header file for SYSCON (System Control) driver API.