Board Support Package (BSP): this layer offers a set of APIs related to the hardware
components on the hardware boards (Audio codec, I/O expander, Touchscreen, SRAM
driver, LCD drivers. etc…) and composed of two parts:
– Component: is the driver related to the external device on the board and not
related to the STM32, the component driver provides specific APIs to the BSP
driver’s external components and can be ported to any board.
– BSP driver: it enables the component driver to be linked to a specific board and
provides a set of user-friendly APIs. The API naming rule is
BSP_FUNCT_Action(): ex. BSP_LED_Init(),BSP_LED_On()
It's based on a modular architecture that allows it to be ported easily
-------------------
BSP板级支持包,听的都是开发板上用到的API接口,比如自带的音频解码,IO扩展了,触摸屏了,LCD驱动了,
使用方法命名都是BSP开头的。
比如板子上的东东BSP_FUNCT_Action(): ex. BSP_LED_Init(),BSP_LED_On()
这是板子上的LED的命名方法。。。如果你用自己的板子,也可以这么命名这么改。
Hardware Abstraction Layer (HAL): this layer provides the low level drivers and the
hardware interfacing methods to interact with the upper layers (application, libraries
and stacks). It provides generic, multi instance and function-oriented APIs which allow
to offload the user application implementation by providing ready-to-use processes. For
example, for the communication peripherals (I2S, UART…)
---------------------------
HAL,硬件抽象层,这提供了底层的驱动,也就是底层硬件接口的方法,一般就是芯片内部外设如何调用的函数集。比如串口了,I2S了,PWM了,乱七八糟了。
实际上这就是我们学习这个系列芯片的主打内容了。
关于自带那个例程的包包里都是关于哪些呢?主要是:
Basic peripheral usage examples: this layer contains examples of basic operation of
the STM32F4 peripherals using only the HAL and BSP resources.
基于外设的,主要用到了HAL和BSP
HAL是芯片内部的定义,BSP板级的,就是芯片之外的。