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

Public APIs to get device Information. More...

#include <zephyr/types.h>
#include <sys/types.h>
#include <stddef.h>
#include <errno.h>
#include <zephyr/kernel.h>
#include <zephyr/syscalls/hwinfo.h>

Go to the source code of this file.

Macros

Reset cause flags

#define RESET_PIN   BIT(0)
 External pin.
 
#define RESET_SOFTWARE   BIT(1)
 Software reset.
 
#define RESET_BROWNOUT   BIT(2)
 Brownout (drop in voltage)
 
#define RESET_POR   BIT(3)
 Power-on reset (POR)
 
#define RESET_WATCHDOG   BIT(4)
 Watchdog timer expiration.
 
#define RESET_DEBUG   BIT(5)
 Debug event.
 
#define RESET_SECURITY   BIT(6)
 Security violation.
 
#define RESET_LOW_POWER_WAKE   BIT(7)
 Waking up from low power mode.
 
#define RESET_CPU_LOCKUP   BIT(8)
 CPU lock-up detected.
 
#define RESET_PARITY   BIT(9)
 Parity error.
 
#define RESET_PLL   BIT(10)
 PLL error.
 
#define RESET_CLOCK   BIT(11)
 Clock error.
 
#define RESET_HARDWARE   BIT(12)
 Hardware reset.
 
#define RESET_USER   BIT(13)
 User reset.
 
#define RESET_TEMPERATURE   BIT(14)
 Temperature reset.
 

Functions

ssize_t hwinfo_get_device_id (uint8_t *buffer, size_t length)
 Copy the device id to a buffer.
 
int hwinfo_get_device_eui64 (uint8_t *buffer)
 Copy the device EUI64 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.
 

Detailed Description

Public APIs to get device Information.