Eve_Hal framework APIs. More...
#include "EVE_HalDefs.h"
Go to the source code of this file.
Functions | |
INIT | |
void | EVE_HalImpl_initialize () |
Initialize HAL platform. | |
void | EVE_HalImpl_release () |
Release HAL platform. | |
bool | EVE_HalImpl_defaults (EVE_HalParameters *parameters, size_t deviceIdx) |
Get the default configuration parameters. | |
bool | EVE_HalImpl_open (EVE_HalContext *phost, const EVE_HalParameters *parameters) |
Opens a new HAL context using the specified parameters. | |
void | EVE_HalImpl_close (EVE_HalContext *phost) |
Close a HAL context. | |
void | EVE_HalImpl_idle (EVE_HalContext *phost) |
Idle. Call regularly to update frequently changing internal state. | |
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 void | EVE_Hal_endTransfer (EVE_HalContext *phost) |
End data transfer. | |
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_flush (EVE_HalContext *phost) |
Flush data to Coprocessor. | |
MISC | |
void | EVE_Mcu_initialize () |
Init FT9x host MCU. | |
void | EVE_Mcu_release () |
Release FT9x host MCU. | |
void | EVE_Millis_initialize () |
Init FT9x timer. | |
void | EVE_Millis_release () |
Release FT9x timer. | |
EVE_HAL_EXPORT uint32_t | EVE_millis () |
Get clock in miliseond. | |
EVE_HAL_EXPORT uint64_t | EVE_millis64 () |
Get clock in miliseond. | |
bool | EVE_UtilImpl_bootupDisplayGpio (EVE_HalContext *phost) |
Display GPIO pins. | |
Variables | |
EVE_HalPlatform | g_HalPlatform |
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_HalImpl.h.
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.
phost | Pointer to Hal context |
Definition at line 304 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.
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.
void EVE_HalImpl_close | ( | EVE_HalContext * | phost | ) |
Close a HAL context.
Close a HAL context
phost | Pointer to Hal context |
Definition at line 223 of file EVE_HalImpl_FT9XX.c.
bool EVE_HalImpl_defaults | ( | EVE_HalParameters * | parameters, |
size_t | deviceIdx | ||
) |
Get the default configuration parameters.
Get the default configuration parameters. Use deviceIdx
to choose the connected device.
parameters | EVE_Hal framework's parameters |
deviceIdx |
Definition at line 116 of file EVE_HalImpl_FT9XX.c.
void EVE_HalImpl_idle | ( | EVE_HalContext * | phost | ) |
Idle. Call regularly to update frequently changing internal state.
Idle. Call regularly to update frequently changing internal state
phost | Pointer to Hal context |
Definition at line 237 of file EVE_HalImpl_FT9XX.c.
void EVE_HalImpl_initialize | ( | ) |
Initialize HAL platform.
Initialize HAL platform
Definition at line 57 of file EVE_HalImpl_FT9XX.c.
bool EVE_HalImpl_open | ( | EVE_HalContext * | phost, |
const EVE_HalParameters * | parameters | ||
) |
Opens a new HAL context using the specified parameters.
Opens a new HAL context using the specified parameters
phost | Pointer to Hal context |
parameters | EVE_Hal framework's parameters |
Definition at line 191 of file EVE_HalImpl_FT9XX.c.
void EVE_HalImpl_release | ( | ) |
Release HAL platform.
Release HAL platform
Definition at line 65 of file EVE_HalImpl_FT9XX.c.
void EVE_Mcu_initialize | ( | ) |
Init FT9x host MCU.
Definition at line 720 of file EVE_HalImpl_FT9XX.c.
void EVE_Mcu_release | ( | ) |
Release FT9x host MCU.
Definition at line 781 of file EVE_HalImpl_FT9XX.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.
void EVE_Millis_initialize | ( | ) |
Init FT9x timer.
Definition at line 802 of file EVE_HalImpl_FT9XX.c.
void EVE_Millis_release | ( | ) |
Release FT9x timer.
Definition at line 826 of file EVE_HalImpl_FT9XX.c.
bool EVE_UtilImpl_bootupDisplayGpio | ( | EVE_HalContext * | phost | ) |
Display GPIO pins.
phost | Pointer to Hal context |
Definition at line 915 of file EVE_HalImpl_FT9XX.c.
|
extern |