ZHCAE13A May 2024 – July 2024 TPS2HCS10-Q1
米6体育平台手机版_好二三四 (TI) 为 HCS 系列智能保险丝高侧开关提供的驱动器套件被设计为通用型,并允许对底层器件进行完整配置和利用。这些驱动程序的特性包括:
图 2-1 中展示了驱动程序以及与所提供代码示例的关系:
顶级驱动程序 API 具有 HCS_ 前缀以表示 HCS 系列智能保险丝器件,这些 API 在软件包的 hcs_control_driver.h 和 hcs_control_driver.c 中提供。顶级代码示例使用这些 API 来提供一组通用功能,从而控制和配置高侧开关。对于物理 SPI 通信,hcs_control_driver.h 中声明了一组外部函数:
/* --------------------------- Porting Functions ---------------------------- */
/*
* These functions need to be implemented by each individual device port. The functions
* handle the low-level hardware specific implementation with the respective
* architecture's specific hardware peripherals (SPI and GPIO)
*/
bool HCS_port_spiSendData(uint8_t *data, uint8_t len, uint8_t* respData);
void HCS_port_assertSPI(void);
void HCS_port_deassertSPI(void);
这些函数在每个单独的架构实现方案中定义,并处理每个平台的硬件 SPI 交互。有关将这些函数移植到其他架构的更多详细信息,请参阅“移植到其他平台”(节 2.3)。包含功能、参数和返回值的完整 API 列表可在 API 指南(节 2.4)中找到。