Eve_Hal framework APIs. More...
Go to the source code of this file.
Functions | |
INIT | |
EVE_HAL_EXPORT EVE_HalPlatform * | EVE_Hal_initialize () |
Eve_Hal framework initialization. | |
EVE_HAL_EXPORT void | EVE_Hal_release () |
Close Eve_Hal framework. | |
EVE_HAL_EXPORT void | EVE_Hal_defaults (EVE_HalParameters *parameters) |
Setup default parameters for Eve_Hal framework. | |
EVE_HAL_EXPORT void | EVE_Hal_defaultsEx (EVE_HalParameters *parameters, size_t deviceIdx) |
Setup default parameters for Eve_Hal framework. | |
EVE_HAL_EXPORT bool | EVE_Hal_open (EVE_HalContext *phost, const EVE_HalParameters *parameters) |
Open the Eve_Hal framework. | |
EVE_HAL_EXPORT void | EVE_Hal_close (EVE_HalContext *phost) |
Close the Eve_Hal framework. | |
EVE_HAL_EXPORT void | EVE_Hal_idle (EVE_HalContext *phost) |
Idle handler for Eve_Hal framework. | |
TRANSFER HELPERS | |
EVE_HAL_EXPORT uint8_t | EVE_Hal_rd8 (EVE_HalContext *phost, uint32_t addr) |
Read 8 bits from Coprocessor's memory. | |
EVE_HAL_EXPORT uint16_t | EVE_Hal_rd16 (EVE_HalContext *phost, uint32_t addr) |
Read 2 bytes from Coprocessor's memory. | |
EVE_HAL_EXPORT uint32_t | EVE_Hal_rd32 (EVE_HalContext *phost, uint32_t addr) |
Read 4 bytes from Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_rdMem (EVE_HalContext *phost, uint8_t *result, uint32_t addr, uint32_t size) |
Read a block data from Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_wr8 (EVE_HalContext *phost, uint32_t addr, uint8_t v) |
Write 8 bits to Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_wr16 (EVE_HalContext *phost, uint32_t addr, uint16_t v) |
Write 2 bytes to Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_wr32 (EVE_HalContext *phost, uint32_t addr, uint32_t v) |
Write 4 bytes to Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_wrMem (EVE_HalContext *phost, uint32_t addr, const uint8_t *buffer, uint32_t size) |
Write a buffer to Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_wrProgMem (EVE_HalContext *phost, uint32_t addr, eve_progmem_const uint8_t *buffer, uint32_t size) |
Write a buffer in ProgMem to Coprocessor's memory. | |
EVE_HAL_EXPORT void | EVE_Hal_wrString (EVE_HalContext *phost, uint32_t addr, const char *str, uint32_t index, uint32_t size, uint32_t padMask) |
Write a string to Coprocessor's memory. | |
UTILITY | |
EVE_HAL_EXPORT int32_t | EVE_Hal_clockTrimming (EVE_HalContext *phost, uint32_t lowFreq) |
Trim the internal clock till the measured frequency is within the acceptable range. | |
HOST | |
EVE_HAL_EXPORT void | EVE_Host_clockSelect (EVE_HalContext *phost, EVE_PLL_SOURCE_T pllsource) |
Select clock source for Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Host_pllFreqSelect (EVE_HalContext *phost, EVE_PLL_FREQ_T freq) |
Select system clock for Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Host_powerModeSwitch (EVE_HalContext *phost, EVE_POWER_MODE_T pwrmode) |
Switch power mode for Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Host_coreReset (EVE_HalContext *phost) |
Send reset signal to Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Host_selectSysClk (EVE_HalContext *phost, EVE_81X_PLL_FREQ_T freq) |
Set system clock for Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Host_powerOffComponents (EVE_HalContext *phost, uint8_t val) |
Power off a component. | |
EVE_HAL_EXPORT void | EVE_Host_padDriveStrength (EVE_HalContext *phost, EVE_81X_GPIO_DRIVE_STRENGTH_T strength, EVE_81X_GPIO_GROUP_T group) |
Set the drive strength for various pins. | |
EVE_HAL_EXPORT void | EVE_Host_resetActive (EVE_HalContext *phost) |
Hold the device in reset state. | |
EVE_HAL_EXPORT void | EVE_Host_resetRemoval (EVE_HalContext *phost) |
Exit reset state, Eve will power on and enter into its default state. | |
void | EVE_Hal_displayMessage (EVE_HalContext *phost, const char *str, uint16_t size) |
Display a fullscreen debug message using TEXT8X8. Uses the back of RAM_G. | |
Variables | |
EVE_HalPlatform | g_HalPlatform |
Eve_Hal framework APIs.
MIT License
Copyright (c) [2019] [Bridgetek Pte Ltd (BRTChip)]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file EVE_Hal.c.
EVE_HAL_EXPORT int32_t EVE_Hal_clockTrimming | ( | EVE_HalContext * | phost, |
uint32_t | lowFreq | ||
) |
Trim the internal clock till the measured frequency is within the acceptable range.
phost | Pointer to Hal context |
lowFreq | Low frequency target to trim |
Definition at line 317 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_close | ( | EVE_HalContext * | phost | ) |
Close the Eve_Hal framework.
phost | Pointer to Hal context |
Definition at line 116 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_defaults | ( | EVE_HalParameters * | parameters | ) |
Setup default parameters for Eve_Hal framework.
parameters | Pointer to EVE_HalParameters |
Definition at line 78 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_defaultsEx | ( | EVE_HalParameters * | parameters, |
size_t | deviceIdx | ||
) |
Setup default parameters for Eve_Hal framework.
parameters | Pointer to EVE_HalParameters |
deviceIdx |
Definition at line 89 of file EVE_Hal.c.
void EVE_Hal_displayMessage | ( | EVE_HalContext * | phost, |
const char * | str, | ||
uint16_t | size | ||
) |
Display a fullscreen debug message using TEXT8X8. Uses the back of RAM_G.
phost | Pointer to Hal context |
str | Error message to show |
size | Size of the message |
Definition at line 486 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_idle | ( | EVE_HalContext * | phost | ) |
Idle handler for Eve_Hal framework.
phost | Pointer to Hal context |
Definition at line 136 of file EVE_Hal.c.
EVE_HAL_EXPORT EVE_HalPlatform * EVE_Hal_initialize | ( | ) |
Eve_Hal framework initialization.
Definition at line 52 of file EVE_Hal.c.
EVE_HAL_EXPORT bool EVE_Hal_open | ( | EVE_HalContext * | phost, |
const EVE_HalParameters * | parameters | ||
) |
Open the Eve_Hal framework.
phost | Pointer to Hal context |
parameters | Pointer to EVE_HalParameters |
Definition at line 103 of file EVE_Hal.c.
EVE_HAL_EXPORT uint16_t EVE_Hal_rd16 | ( | EVE_HalContext * | phost, |
uint32_t | addr | ||
) |
Read 2 bytes from Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be read |
Definition at line 173 of file EVE_Hal.c.
EVE_HAL_EXPORT uint32_t EVE_Hal_rd32 | ( | EVE_HalContext * | phost, |
uint32_t | addr | ||
) |
Read 4 bytes from Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be read |
Definition at line 189 of file EVE_Hal.c.
EVE_HAL_EXPORT uint8_t EVE_Hal_rd8 | ( | EVE_HalContext * | phost, |
uint32_t | addr | ||
) |
Read 8 bits from Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be read |
Definition at line 157 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_rdMem | ( | EVE_HalContext * | phost, |
uint8_t * | result, | ||
uint32_t | addr, | ||
uint32_t | size | ||
) |
Read a block data from Coprocessor's memory.
phost | Pointer to Hal context |
result | Buffer where data write to |
addr | Address to bbe read |
size | Size to be read |
Definition at line 206 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_release | ( | ) |
Close Eve_Hal framework.
Release HAL platform
Definition at line 64 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_wr16 | ( | EVE_HalContext * | phost, |
uint32_t | addr, | ||
uint16_t | v | ||
) |
Write 2 bytes to Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be write |
v | Value to write |
EVE_HAL_EXPORT void EVE_Hal_wr32 | ( | EVE_HalContext * | phost, |
uint32_t | addr, | ||
uint32_t | v | ||
) |
Write 4 bytes to Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be write |
v | Value to write |
EVE_HAL_EXPORT void EVE_Hal_wr8 | ( | EVE_HalContext * | phost, |
uint32_t | addr, | ||
uint8_t | v | ||
) |
Write 8 bits to Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be write |
v | Value to write |
EVE_HAL_EXPORT void EVE_Hal_wrMem | ( | EVE_HalContext * | phost, |
uint32_t | addr, | ||
const uint8_t * | buffer, | ||
uint32_t | size | ||
) |
Write a buffer to Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be write |
buffer | Data to be write |
size | Size of buffer |
EVE_HAL_EXPORT void EVE_Hal_wrProgMem | ( | EVE_HalContext * | phost, |
uint32_t | addr, | ||
eve_progmem_const uint8_t * | buffer, | ||
uint32_t | size | ||
) |
Write a buffer in ProgMem to Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be write |
buffer | Data to be write |
size | Size of buffer |
Definition at line 278 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_wrString | ( | EVE_HalContext * | phost, |
uint32_t | addr, | ||
const char * | str, | ||
uint32_t | index, | ||
uint32_t | size, | ||
uint32_t | padMask | ||
) |
Write a string to Coprocessor's memory.
phost | Pointer to Hal context |
addr | Address to be write |
str | String to be write |
index | Start postion in the string |
size | Size of the string |
padMask | Padding mask |
Definition at line 295 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Host_clockSelect | ( | EVE_HalContext * | phost, |
EVE_PLL_SOURCE_T | pllsource | ||
) |
Select clock source for Coprocessor.
phost | Pointer to Hal context |
pllsource | Clock source |
Definition at line 347 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Host_coreReset | ( | EVE_HalContext * | phost | ) |
EVE_HAL_EXPORT void EVE_Host_padDriveStrength | ( | EVE_HalContext * | phost, |
EVE_81X_GPIO_DRIVE_STRENGTH_T | strength, | ||
EVE_81X_GPIO_GROUP_T | group | ||
) |
Set the drive strength for various pins.
phost | Pointer to Hal context |
strength | Drive strength |
group | Pin group to set |
Definition at line 453 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Host_pllFreqSelect | ( | EVE_HalContext * | phost, |
EVE_PLL_FREQ_T | freq | ||
) |
Select system clock for Coprocessor.
phost | Pointer to Hal context |
freq | Frequency to set |
EVE_HAL_EXPORT void EVE_Host_powerModeSwitch | ( | EVE_HalContext * | phost, |
EVE_POWER_MODE_T | pwrmode | ||
) |
Switch power mode for Coprocessor.
phost | Pointer to Hal context |
pwrmode | Power mode |
EVE_HAL_EXPORT void EVE_Host_powerOffComponents | ( | EVE_HalContext * | phost, |
uint8_t | val | ||
) |
Power off a component.
phost | Pointer to Hal context |
val | Component number |
EVE_HAL_EXPORT void EVE_Host_resetActive | ( | EVE_HalContext * | phost | ) |
EVE_HAL_EXPORT void EVE_Host_resetRemoval | ( | EVE_HalContext * | phost | ) |
EVE_HAL_EXPORT void EVE_Host_selectSysClk | ( | EVE_HalContext * | phost, |
EVE_81X_PLL_FREQ_T | freq | ||
) |
Set system clock for Coprocessor.
phost | Pointer to Hal context |
freq | Frequency to set |
Definition at line 390 of file EVE_Hal.c.
EVE_HalPlatform g_HalPlatform |