HAL Q Overview

Introducing Q

group Q_Introduction

Q handles linked-list operations.

A queue is a set of linked nodes, each containing data and a link to the next node.

The following operations are supported: initialize and de-initialize the queue, and insert, remove, or replace nodes at the head, tail, or any position.

A linked list can be made circular, looping back to any position in the queue.

One queue can also be inserted into another, which merges them.

Create nodes externally using drivers such as DMA, SD, or MMC, using functions like HAL_DMA_FillNodeConfig.

Module and files

The following diagram illustrates the Q module and its associated files.

Module and files diagram

Component diagram

The following diagram illustrates the software components involved in the Q module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.


@startuml
<style>
componentDiagram {
   arrow {
      FontSize 8
   }
}
</style>

title Q Software Component Diagram

package "HAL" {
    [HAL_Q]
    [HAL_SD]
	[HAL_MMC]
    [HAL_DMA]
}

package "Low Layer" {
    [CMSIS]
    [LL_DMA]
    [SDMMC_CORE]
    [SDMMC Interrupt routine service]
    [DMA Interrupt routine service]
}

package "HW" {
    [STM32_HW]
}

[Appli] --> [HAL_Q] : HAL Q API
[Appli] <-- [HAL_Q] : Status Q API 
[Appli] --> [HAL_DMA] : HAL DMA API
[Appli] <-- [HAL_DMA] : DMA callback
[Appli] --> [HAL_SD] : HAL SD API
[Appli] <-- [HAL_SD] : SD callback
[Appli] --> [HAL_MMC] : HAL MMC API
[Appli] <-- [HAL_MMC] : MMC callback
[HAL_SD] <-- [SDMMC_CORE]
[HAL_MMC] <-- [SDMMC_CORE]
[HAL_DMA] <-- [LL_DMA]
[HAL_SD] <-- [SDMMC Interrupt routine service]
[HAL_MMC] <-- [SDMMC Interrupt routine service]
[HAL_DMA] <-d- [DMA Interrupt routine service]
[STM32_HW] -u--> [SDMMC Interrupt routine service]: SDMMC Irq
[STM32_HW] -u--> [DMA Interrupt routine service] : DMA Channel Irq
[LL_DMA] --> [CMSIS]:DMA register def
[SDMMC_CORE] --> [CMSIS]:SDMMC register def
[STM32_HW] <-u-- [LL_DMA] : DMA registers R/W
[STM32_HW] <-u-- [SDMMC_CORE] : SDMMC registers R/W
@enduml

Configuration table

The following table lists the configuration defines for the HAL Q module, specifying their locations, default values, and descriptions:

group Q_Configuration_Table

Configuration inside the Q module

Config definitions

Description

Default value

Note

USE_ASSERT_DBG_PARAM

from IDE

None

When defined, enable parameter asserts.

USE_HAL_CHECK_PARAM

from hal_conf.h

0U

It allows using run-time checks on parameters.

USE_HAL_{PPP}_LINKEDLIST

from hal_conf.h

0U

It allows using the PPP in linked-list mode.

USE_HAL_Q_CIRCULAR_LINK

from hal_ppp.h

0U

It allows using a circular-link queue.