Introduction
The D7 SDK System Library provides interfaces for controlling various hardware components of the Veethree D7 platform including display backlight, button illumination, buzzer, and bootloader environment variables retrieval, and otp register access.
Key Features
- Display backlight control with brightness adjustment
- Button illumination control with individual and group control
- Buzzer control for audible feedback
- Set and get operations of the bootloader environment variables
- System information retrieval
- OTP register read operations
Architecture
The System Library is organized into several key components:
- Display - Control of the display backlight and properties
- Buttons - Control of button illumination
- Buzzer - Control of the system buzzer
- Bootloader - Interface for bootloader operations
- System Info - Functions to retrieve system information
- OTP - One-Time Programmable register access for device configuration
Main Components
Display Control
The Display component provides interfaces for controlling the display backlight and properties.
Key class:
void example() {
}
static void set_brightness(uint32_t value)
Set the brightness level.
backlight_manager interface.
Any entities that belong to the system library.
Button Backlight control
The Button Backlight control provides interfaces for controlling the button LEDs.
Key class:
Buzzer Control
The Buzzer component provides interfaces for generating audible feedback.
Key class:
void example() {
std::this_thread::sleep_for(500ms);
}
static void buzzer_enable(bool enable, buzzer_boost level=buzzer_boost::no_boost)
Enable or disable the buzzer, using default definitions for buzzer_config.
Bootloader Operations
The bootloader component is responsible for interacting with the board bootloader, primarily via bootloader environment variables.
Key class:
void example() {
std::string brightness_level{};
}
bootloader_manager interface
static void get_value(std::string_view var, uint64_t &value)
Get a bootloader variable value.
static void set_value(std::string_view var, uint64_t value, bool hex=false)
Set a bootloader variable value.
System Information
The System Information component provides interfaces for retrieving system information.
Key classes:
void example() {
}
static std::string soc_serial_number()
Get the board SoC serial number.
OTP Register Access
The OTP (One-Time Programmable) component provides interfaces for reading permanent device configuration data, and factory-programmed information from OTP registers.
Key class:
void read_device_info() {
std::vector<uint32_t> data;
if (result == otp_result::success) {
for (size_t i = 0; i < data.size(); i++) {
}
}
}
static otp_result read(uint32_t word_address, size_t num_words, std::vector< uint32_t > &data)
Read OTP register words.
OTP register manager interface.
Common OTP Register Addresses
| Fuse Row Index | Purpose |
| 708-709 | MAC Address 1 |
| 710-711 | MAC Address 2 |
| 765-766 | Device Information |
Please refer to the i.MX8QXP Reference Manual, Chapter 7 (Fuse Map) for complete fuse row specifications.
See the System library examples page for complete code examples.