Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hwinfo.h
Go to the documentation of this file.
1
7/*
8 * Copyright (c) 2018 Alexander Wachter
9 *
10 * SPDX-License-Identifier: Apache-2.0
11 */
12
13#ifndef ZEPHYR_INCLUDE_DRIVERS_HWINFO_H_
14#define ZEPHYR_INCLUDE_DRIVERS_HWINFO_H_
15
25#include <zephyr/types.h>
26#include <sys/types.h>
27#include <stddef.h>
28#include <errno.h>
29#include <zephyr/kernel.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
41#define RESET_PIN BIT(0)
43#define RESET_SOFTWARE BIT(1)
45#define RESET_BROWNOUT BIT(2)
47#define RESET_POR BIT(3)
49#define RESET_WATCHDOG BIT(4)
51#define RESET_DEBUG BIT(5)
53#define RESET_SECURITY BIT(6)
55#define RESET_LOW_POWER_WAKE BIT(7)
57#define RESET_CPU_LOCKUP BIT(8)
59#define RESET_PARITY BIT(9)
61#define RESET_PLL BIT(10)
63#define RESET_CLOCK BIT(11)
65#define RESET_HARDWARE BIT(12)
67#define RESET_USER BIT(13)
69#define RESET_TEMPERATURE BIT(14)
94__syscall ssize_t hwinfo_get_device_id(uint8_t *buffer, size_t length);
95
96ssize_t z_impl_hwinfo_get_device_id(uint8_t *buffer, size_t length);
97
110__syscall int hwinfo_get_device_eui64(uint8_t *buffer);
111
112int z_impl_hwinfo_get_device_eui64(uint8_t *buffer);
113
134__syscall int hwinfo_get_reset_cause(uint32_t *cause);
135
136int z_impl_hwinfo_get_reset_cause(uint32_t *cause);
137
147__syscall int hwinfo_clear_reset_cause(void);
148
149int z_impl_hwinfo_clear_reset_cause(void);
150
163
164int z_impl_hwinfo_get_supported_reset_cause(uint32_t *supported);
165
170#ifdef __cplusplus
171}
172#endif
173
174#include <zephyr/syscalls/hwinfo.h>
175
176#endif /* ZEPHYR_INCLUDE_DRIVERS_HWINFO_H_ */
System error numbers.
int hwinfo_get_device_eui64(uint8_t *buffer)
Copy the device EUI64 to a buffer.
ssize_t hwinfo_get_device_id(uint8_t *buffer, size_t length)
Copy the device id to a buffer.
int hwinfo_get_reset_cause(uint32_t *cause)
Retrieve cause of device reset.
int hwinfo_clear_reset_cause(void)
Clear cause of device reset.
int hwinfo_get_supported_reset_cause(uint32_t *supported)
Get supported reset cause flags.
Public kernel APIs.
__SIZE_TYPE__ ssize_t
Definition types.h:28
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88