Eve_Hal framework APIs. More...
Go to the source code of this file.
Data Structures | |
struct | EVE_DeviceInfo |
struct | EVE_HalParameters |
struct | EVE_HalDlState |
struct | EVE_HalContext |
struct | EVE_HalPlatform |
Macros | |
#define | RAM_ERR_REPORT_MAX 128 |
#define | EVE_DL_STATE phost->DlState[phost->DlStateIndex] |
Typedefs | |
typedef enum EVE_MODE_T | EVE_MODE_T |
typedef enum EVE_STATUS_T | EVE_STATUS_T |
typedef enum EVE_TRANSFER_T | EVE_TRANSFER_T |
typedef enum EVE_CHIPID_T | EVE_CHIPID_T |
typedef struct EVE_HalContext | EVE_HalContext |
typedef bool(* | EVE_Callback) (EVE_HalContext *phost) |
typedef int(* | EVE_CoCmdHook) (EVE_HalContext *phost, uint32_t cmd, uint32_t state) |
typedef void(* | EVE_ResetCallback) (EVE_HalContext *phost, bool fault) |
typedef enum EVE_HOST_T | EVE_HOST_T |
typedef struct EVE_DeviceInfo | EVE_DeviceInfo |
typedef struct EVE_HalParameters | EVE_HalParameters |
typedef struct EVE_HalDlState | EVE_HalDlState |
typedef struct EVE_HalPlatform | EVE_HalPlatform |
Enumerations | |
enum | EVE_MODE_T { EVE_MODE_UNKNOWN = 0 , EVE_MODE_I2C , EVE_MODE_SPI } |
enum | EVE_STATUS_T { EVE_STATUS_CLOSED = 0 , EVE_STATUS_OPENED , EVE_STATUS_READING , EVE_STATUS_WRITING , EVE_STATUS_ERROR } |
enum | EVE_TRANSFER_T { EVE_TRANSFER_NONE = 0 , EVE_TRANSFER_READ , EVE_TRANSFER_WRITE } |
enum | EVE_CHIPID_T { EVE_CHIPID_FT800 = EVE_FT800 , EVE_CHIPID_FT801 = EVE_FT801 , EVE_CHIPID_FT810 = EVE_FT810 , EVE_CHIPID_FT811 = EVE_FT811 , EVE_CHIPID_FT812 = EVE_FT812 , EVE_CHIPID_FT813 = EVE_FT813 , EVE_CHIPID_BT880 = EVE_BT880 , EVE_CHIPID_BT881 = EVE_BT881 , EVE_CHIPID_BT882 = EVE_BT882 , EVE_CHIPID_BT883 = EVE_BT883 , EVE_CHIPID_BT815 = EVE_BT815 , EVE_CHIPID_BT816 = EVE_BT816 , EVE_CHIPID_BT817 = EVE_BT817 , EVE_CHIPID_BT818 = EVE_BT818 } |
enum | EVE_HOST_T { EVE_HOST_UNKNOWN = 0 , EVE_HOST_BT8XXEMU , EVE_HOST_FT4222 , EVE_HOST_MPSSE , EVE_HOST_EMBEDDED , EVE_HOST_NB } |
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 size_t | EVE_Hal_list () |
List the available devices. | |
EVE_HAL_EXPORT void | EVE_Hal_info (EVE_DeviceInfo *deviceInfo, size_t deviceIdx) |
Get info of the specified device. Devices of type EVE_HOST_UNKNOWN should be ignored. | |
EVE_HAL_EXPORT bool | EVE_Hal_isDevice (EVE_HalContext *phost, size_t deviceIdx) |
Check whether the context is the specified device. | |
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 | |
EVE_HAL_EXPORT void | EVE_Hal_startTransfer (EVE_HalContext *phost, EVE_TRANSFER_T rw, uint32_t addr) |
Start data transfer to Coprocessor. | |
EVE_HAL_EXPORT uint8_t | EVE_Hal_transfer8 (EVE_HalContext *phost, uint8_t value) |
Write 8 bits to Coprocessor. | |
EVE_HAL_EXPORT uint16_t | EVE_Hal_transfer16 (EVE_HalContext *phost, uint16_t value) |
Write 2 bytes to Coprocessor. | |
EVE_HAL_EXPORT uint32_t | EVE_Hal_transfer32 (EVE_HalContext *phost, uint32_t value) |
Write 4 bytes to Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Hal_transferMem (EVE_HalContext *phost, uint8_t *result, const uint8_t *buffer, uint32_t size) |
Transfer (read/write) a block data to Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Hal_transferProgMem (EVE_HalContext *phost, uint8_t *result, eve_progmem_const uint8_t *buffer, uint32_t size) |
Transfer a block data from program memory. | |
EVE_HAL_EXPORT uint32_t | EVE_Hal_transferString (EVE_HalContext *phost, const char *str, uint32_t index, uint32_t size, uint32_t padMask) |
Transfer a string to EVE platform. | |
EVE_HAL_EXPORT void | EVE_Hal_endTransfer (EVE_HalContext *phost) |
End data transfer. | |
EVE_HAL_EXPORT void | EVE_Hal_flush (EVE_HalContext *phost) |
Flush data to Coprocessor. | |
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. | |
CAPS | |
static bool | EVE_Hal_isScreenCapacitive (EVE_HalContext *phost) |
static bool | EVE_Hal_isScreenResistive (EVE_HalContext *phost) |
static bool | EVE_Hal_supportHsf (EVE_HalContext *phost) |
static bool | EVE_Hal_supportFlash (EVE_HalContext *phost) |
static bool | EVE_Hal_supportCmdB (EVE_HalContext *phost) |
static bool | EVE_Hal_supportMediaFifo (EVE_HalContext *phost) |
static bool | EVE_Hal_supportVideo (EVE_HalContext *phost) |
static bool | EVE_Hal_supportLargeFont (EVE_HalContext *phost) |
static EVE_CHIPID_T | EVE_extendedChipId (int chipId) |
static int | EVE_shortChipId (EVE_CHIPID_T chipId) |
static int | EVE_gen (EVE_CHIPID_T chipId) |
UTILITY | |
EVE_HAL_EXPORT void | EVE_Hal_hostCommand (EVE_HalContext *phost, uint8_t cmd) |
Send a host command to Coprocessor. | |
EVE_HAL_EXPORT void | EVE_Hal_hostCommandExt3 (EVE_HalContext *phost, uint32_t cmd) |
This API sends a 3byte command to the phost. | |
EVE_HAL_EXPORT bool | EVE_Hal_powerCycle (EVE_HalContext *phost, bool up) |
Toggle PD_N pin of FT800 board for a power cycle. | |
EVE_HAL_EXPORT void | EVE_Hal_setSPI (EVE_HalContext *phost, EVE_SPI_CHANNELS_T numchnls, uint8_t numdummy) |
Set number of SPI channel. | |
EVE_HAL_EXPORT void | EVE_Hal_restoreSPI (EVE_HalContext *phost) |
EVE_HAL_EXPORT uint32_t | EVE_Hal_currentFrequency (EVE_HalContext *phost) |
Get current system clock of Coprocessor. | |
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. | |
MISC | |
EVE_HAL_EXPORT uint32_t | EVE_millis () |
Get clock in miliseond. | |
EVE_HAL_EXPORT uint64_t | EVE_millis64 () |
Get clock in miliseond. | |
EVE_HAL_EXPORT void | EVE_sleep (uint32_t ms) |
Sleep in milisecond. | |
DEBUG | |
#define | EVE_Hal_displayMessageZ(phost, str) EVE_Hal_displayMessage((phost), (str), (uint16_t)strlen((str))) |
EVE_HAL_EXPORT 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. | |
Eve_Hal framework APIs.
This file defines the generic APIs of phost access layer for the FT800 or EVE compatible silicon. Application shall access FT800 or EVE resources over these APIs,regardless of I2C or SPI protocol. In addition, there are some helper functions defined for FT800 coprocessor engine as well as phost commands.
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_HalDefs.h.
#define EVE_DL_STATE phost->DlState[phost->DlStateIndex] |
Definition at line 198 of file EVE_HalDefs.h.
#define EVE_Hal_displayMessageZ | ( | phost, | |
str | |||
) | EVE_Hal_displayMessage((phost), (str), (uint16_t)strlen((str))) |
Display a fullscreen debug message using TEXT8X8. Uses the back of RAM_G.
Definition at line 676 of file EVE_HalDefs.h.
#define RAM_ERR_REPORT_MAX 128 |
Definition at line 89 of file EVE_HalDefs.h.
typedef bool(* EVE_Callback) (EVE_HalContext *phost) |
Definition at line 96 of file EVE_HalDefs.h.
typedef enum EVE_CHIPID_T EVE_CHIPID_T |
typedef int(* EVE_CoCmdHook) (EVE_HalContext *phost, uint32_t cmd, uint32_t state) |
Hook into coprocessor commands. Return 1 to abort the command. Useful for an optimization routine
Definition at line 99 of file EVE_HalDefs.h.
typedef struct EVE_DeviceInfo EVE_DeviceInfo |
typedef struct EVE_HalContext EVE_HalContext |
Definition at line 95 of file EVE_HalDefs.h.
typedef struct EVE_HalDlState EVE_HalDlState |
typedef struct EVE_HalParameters EVE_HalParameters |
Hal parameters
typedef struct EVE_HalPlatform EVE_HalPlatform |
typedef enum EVE_HOST_T EVE_HOST_T |
typedef enum EVE_MODE_T EVE_MODE_T |
typedef void(* EVE_ResetCallback) (EVE_HalContext *phost, bool fault) |
Hook into coprocessor reset
Definition at line 101 of file EVE_HalDefs.h.
typedef enum EVE_STATUS_T EVE_STATUS_T |
typedef enum EVE_TRANSFER_T EVE_TRANSFER_T |
enum EVE_CHIPID_T |
Definition at line 71 of file EVE_HalDefs.h.
enum EVE_HOST_T |
Enumerator | |
---|---|
EVE_HOST_UNKNOWN | 0 |
EVE_HOST_BT8XXEMU | |
EVE_HOST_FT4222 | |
EVE_HOST_MPSSE | |
EVE_HOST_EMBEDDED | |
EVE_HOST_NB |
Definition at line 131 of file EVE_HalDefs.h.
enum EVE_MODE_T |
Enumerator | |
---|---|
EVE_MODE_UNKNOWN | 0 |
EVE_MODE_I2C | |
EVE_MODE_SPI |
Definition at line 48 of file EVE_HalDefs.h.
enum EVE_STATUS_T |
Enumerator | |
---|---|
EVE_STATUS_CLOSED | 0 |
EVE_STATUS_OPENED | |
EVE_STATUS_READING | |
EVE_STATUS_WRITING | |
EVE_STATUS_ERROR |
Definition at line 55 of file EVE_HalDefs.h.
enum EVE_TRANSFER_T |
Enumerator | |
---|---|
EVE_TRANSFER_NONE | 0 |
EVE_TRANSFER_READ | |
EVE_TRANSFER_WRITE |
Definition at line 64 of file EVE_HalDefs.h.
|
inlinestatic |
Include the EVE generation in the chip ID value to simplify feature set comparisons(BT880 support)
Definition at line 540 of file EVE_HalDefs.h.
|
inlinestatic |
Definition at line 574 of file EVE_HalDefs.h.
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.
Close a HAL context
phost | Pointer to Hal context |
Definition at line 116 of file EVE_Hal.c.
EVE_HAL_EXPORT uint32_t EVE_Hal_currentFrequency | ( | EVE_HalContext * | phost | ) |
Get current system clock of Coprocessor.
phost | Pointer to Hal context |
Definition at line 650 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_defaults | ( | EVE_HalParameters * | parameters | ) |
Setup default parameters for Eve_Hal framework.
Get the default configuration parameters
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.
Get the default configuration parameters. Use deviceIdx
to choose the connected device, or set to -1 to get the first available device.
parameters | Pointer to EVE_HalParameters |
deviceIdx |
Definition at line 89 of file EVE_Hal.c.
EVE_HAL_EXPORT 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.
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_endTransfer | ( | EVE_HalContext * | phost | ) |
End data transfer.
phost | Pointer to Hal context |
Definition at line 291 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_flush | ( | EVE_HalContext * | phost | ) |
Flush data to Coprocessor.
Flush any pending write transfers
phost | Pointer to Hal context |
Definition at line 304 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_hostCommand | ( | EVE_HalContext * | phost, |
uint8_t | cmd | ||
) |
Send a host command to Coprocessor.
phost | Pointer to Hal context |
cmd | Command to send |
Definition at line 544 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_hostCommandExt3 | ( | EVE_HalContext * | phost, |
uint32_t | cmd | ||
) |
This API sends a 3byte command to the phost.
This API sends a 3byte command to the phost
phost | Pointer to Hal context |
cmd | Command to send |
Definition at line 565 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_idle | ( | EVE_HalContext * | phost | ) |
Idle handler for Eve_Hal framework.
Idle. Call regularly to update frequently changing internal state. This is also called while waiting for cmd, in addition to the user idle callback
phost | Pointer to Hal context |
Definition at line 136 of file EVE_Hal.c.
EVE_HAL_EXPORT void EVE_Hal_info | ( | EVE_DeviceInfo * | deviceInfo, |
size_t | deviceIdx | ||
) |
Get info of the specified device. Devices of type EVE_HOST_UNKNOWN should be ignored.
Get info of the specified device. Devices of type EVE_HOST_UNKNOWN should be ignored
deviceInfo | |
deviceIdx |
Definition at line 87 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT EVE_HalPlatform * EVE_Hal_initialize | ( | ) |
Eve_Hal framework initialization.
Initialize HAL platform
Definition at line 52 of file EVE_Hal.c.
EVE_HAL_EXPORT bool EVE_Hal_isDevice | ( | EVE_HalContext * | phost, |
size_t | deviceIdx | ||
) |
Check whether the context is the specified device.
Check whether the context is the specified device
phost | Pointer to Hal context |
deviceIdx |
Definition at line 103 of file EVE_HalImpl_FT9XX.c.
|
inlinestatic |
Screen based on chip id. This function compiles as a constant on single supported chipid target
Definition at line 473 of file EVE_HalDefs.h.
|
inlinestatic |
Screen based on chip id. This function compiles as a constant on single supported chipid target
Definition at line 479 of file EVE_HalDefs.h.
EVE_HAL_EXPORT size_t EVE_Hal_list | ( | ) |
List the available devices.
List the available devices
Definition at line 76 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT bool EVE_Hal_open | ( | EVE_HalContext * | phost, |
const EVE_HalParameters * | parameters | ||
) |
Open the Eve_Hal framework.
Opens a new HAL context using the specified parameters
phost | Pointer to Hal context |
parameters | Pointer to EVE_HalParameters |
Definition at line 103 of file EVE_Hal.c.
EVE_HAL_EXPORT bool EVE_Hal_powerCycle | ( | EVE_HalContext * | phost, |
bool | up | ||
) |
Toggle PD_N pin of FT800 board for a power cycle.
Toggle PD_N pin of FT800 board for a power cycle. Returns false on failure
phost | Pointer to Hal context |
up | Up or Down |
Definition at line 588 of file EVE_HalImpl_FT9XX.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_restoreSPI | ( | EVE_HalContext * | phost | ) |
Restore platform to previously configured EVE SPI channel mode
Definition at line 636 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_setSPI | ( | EVE_HalContext * | phost, |
EVE_SPI_CHANNELS_T | numchnls, | ||
uint8_t | numdummy | ||
) |
Set number of SPI channel.
Switch EVE to different SPI channel mode
phost | Pointer to Hal context |
numchnls | Number of channel |
numdummy | Number of dummy bytes |
Definition at line 615 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_startTransfer | ( | EVE_HalContext * | phost, |
EVE_TRANSFER_T | rw, | ||
uint32_t | addr | ||
) |
Start data transfer to Coprocessor.
phost | Pointer to Hal context |
rw | Read or Write |
addr | Address to read/write |
Definition at line 257 of file EVE_HalImpl_FT9XX.c.
|
inlinestatic |
Definition at line 502 of file EVE_HalDefs.h.
|
inlinestatic |
Definition at line 493 of file EVE_HalDefs.h.
|
inlinestatic |
Definition at line 484 of file EVE_HalDefs.h.
|
inlinestatic |
Definition at line 529 of file EVE_HalDefs.h.
|
inlinestatic |
Definition at line 511 of file EVE_HalDefs.h.
|
inlinestatic |
Definition at line 520 of file EVE_HalDefs.h.
EVE_HAL_EXPORT uint16_t EVE_Hal_transfer16 | ( | EVE_HalContext * | phost, |
uint16_t | value | ||
) |
Write 2 bytes to Coprocessor.
phost | Pointer to Hal context |
value | Value to write |
Definition at line 374 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT uint32_t EVE_Hal_transfer32 | ( | EVE_HalContext * | phost, |
uint32_t | value | ||
) |
Write 4 bytes to Coprocessor.
phost | Pointer to Hal context |
value | Value to write |
Definition at line 399 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT uint8_t EVE_Hal_transfer8 | ( | EVE_HalContext * | phost, |
uint8_t | value | ||
) |
Write 8 bits to Coprocessor.
phost | Pointer to Hal context |
value | Value to write |
Definition at line 362 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_transferMem | ( | EVE_HalContext * | phost, |
uint8_t * | result, | ||
const uint8_t * | buffer, | ||
uint32_t | size | ||
) |
Transfer (read/write) a block data to Coprocessor.
phost | Pointer to Hal context |
result | Buffer to get data transfered, NULL when write |
buffer | Buffer where data is transfered, NULL when read |
size | Size of buffer |
Definition at line 429 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT void EVE_Hal_transferProgMem | ( | EVE_HalContext * | phost, |
uint8_t * | result, | ||
eve_progmem_const uint8_t * | buffer, | ||
uint32_t | size | ||
) |
Transfer a block data from program memory.
phost | Pointer to Hal context |
result | Buffer to get data transfered, NULL when write |
buffer | Buffer where data is transfered, NULL when read |
size | Size of buffer |
Definition at line 457 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT uint32_t EVE_Hal_transferString | ( | EVE_HalContext * | phost, |
const char * | str, | ||
uint32_t | index, | ||
uint32_t | size, | ||
uint32_t | padMask | ||
) |
Transfer a string to EVE platform.
phost | Pointer to Hal context |
str | String to transfer |
index | Start position in the string |
size | Size of string |
padMask | Padding mask |
Definition at line 496 of file EVE_HalImpl_FT9XX.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.
This API can only be called when PLL is stopped(SLEEP mode). For compatibility, set frequency to the EVE_GPU_12MHZ option in the EVE_SETPLLSP1_T table.
phost | Pointer to Hal context |
freq | Frequency to set |
Definition at line 390 of file EVE_Hal.c.
EVE_HAL_EXPORT uint32_t EVE_millis | ( | ) |
Get clock in miliseond.
Need to ensure that below api is called at least once in 6.5 seconds duration for FT900 platform as this module doesnt use timer for context update global counter to loopback after ~49.71 days
Definition at line 842 of file EVE_HalImpl_FT9XX.c.
EVE_HAL_EXPORT uint64_t EVE_millis64 | ( | ) |
Get clock in miliseond.
Need to ensure that below api is called at least once in 6.5 seconds duration for FT900 platform as this module doesnt use timer for context update global counter to loopback after ~49.71 days
Definition at line 862 of file EVE_HalImpl_FT9XX.c.
|
inlinestatic |
Remove EVE generation from the chip ID
Definition at line 569 of file EVE_HalDefs.h.
EVE_HAL_EXPORT void EVE_sleep | ( | uint32_t | ms | ) |
Sleep in milisecond.
ms | Milisecond |
Definition at line 895 of file EVE_HalImpl_FT9XX.c.