RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Macros

Macros

#define SMARTCARD_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__)
 Report the SMARTCARD clock source.
 
#define IS_SMARTCARD_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) < 6250001U)
 Check the Baud rate range.
 
#define IS_SMARTCARD_BLOCKLENGTH(__LENGTH__)   ((__LENGTH__) <= 0xFFU)
 Check the block length range.
 
#define IS_SMARTCARD_TIMEOUT_VALUE(__TIMEOUTVALUE__)   ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
 Check the receiver timeout value.
 
#define IS_SMARTCARD_AUTORETRY_COUNT(__COUNT__)   ((__COUNT__) <= 0x7U)
 Check the SMARTCARD autoretry counter value.
 
#define IS_SMARTCARD_WORD_LENGTH(__LENGTH__)   ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B)
 Ensure that SMARTCARD frame length is valid.
 
#define IS_SMARTCARD_STOPBITS(__STOPBITS__)
 Ensure that SMARTCARD frame number of stop bits is valid.
 
#define IS_SMARTCARD_PARITY(__PARITY__)
 Ensure that SMARTCARD frame parity is valid.
 
#define IS_SMARTCARD_MODE(__MODE__)   ((((__MODE__) & 0xFFF3U) == 0x00U) && ((__MODE__) != 0x00U))
 Ensure that SMARTCARD communication mode is valid.
 
#define IS_SMARTCARD_POLARITY(__CPOL__)
 Ensure that SMARTCARD frame polarity is valid.
 
#define IS_SMARTCARD_PHASE(__CPHA__)   (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))
 Ensure that SMARTCARD frame phase is valid.
 
#define IS_SMARTCARD_LASTBIT(__LASTBIT__)
 Ensure that SMARTCARD frame last bit clock pulse setting is valid.
 
#define IS_SMARTCARD_ONE_BIT_SAMPLE(__ONEBIT__)
 Ensure that SMARTCARD frame sampling is valid.
 
#define IS_SMARTCARD_NACK(__NACK__)
 Ensure that SMARTCARD NACK transmission setting is valid.
 
#define IS_SMARTCARD_TIMEOUT(__TIMEOUT__)
 Ensure that SMARTCARD receiver timeout setting is valid.
 
#define IS_SMARTCARD_CLOCKPRESCALER(__CLOCKPRESCALER__)
 Ensure that SMARTCARD clock Prescaler is valid.
 
#define IS_SMARTCARD_ADVFEATURE_INIT(__INIT__)
 Ensure that SMARTCARD advanced features initialization is valid.
 
#define IS_SMARTCARD_ADVFEATURE_TXINV(__TXINV__)
 Ensure that SMARTCARD frame TX inversion setting is valid.
 
#define IS_SMARTCARD_ADVFEATURE_RXINV(__RXINV__)
 Ensure that SMARTCARD frame RX inversion setting is valid.
 
#define IS_SMARTCARD_ADVFEATURE_DATAINV(__DATAINV__)
 Ensure that SMARTCARD frame data inversion setting is valid.
 
#define IS_SMARTCARD_ADVFEATURE_SWAP(__SWAP__)
 Ensure that SMARTCARD frame RX/TX pins swap setting is valid.
 
#define IS_SMARTCARD_OVERRUN(__OVERRUN__)
 Ensure that SMARTCARD frame overrun setting is valid.
 
#define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR(__DMA__)
 Ensure that SMARTCARD DMA enabling or disabling on error setting is valid.
 
#define IS_SMARTCARD_ADVFEATURE_MSBFIRST(__MSBFIRST__)
 Ensure that SMARTCARD frame MSB first setting is valid.
 
#define IS_SMARTCARD_REQUEST_PARAMETER(__PARAM__)
 Ensure that SMARTCARD request parameter is valid.
 

Detailed Description

Macro Definition Documentation

◆ IS_SMARTCARD_ADVFEATURE_DATAINV

#define IS_SMARTCARD_ADVFEATURE_DATAINV (   __DATAINV__)
Value:
(((__DATAINV__) == SMARTCARD_ADVFEATURE_DATAINV_DISABLE) || \
#define SMARTCARD_ADVFEATURE_DATAINV_DISABLE
Definition: stm32h7xx_hal_smartcard.h:512
#define SMARTCARD_ADVFEATURE_DATAINV_ENABLE
Definition: stm32h7xx_hal_smartcard.h:513

Ensure that SMARTCARD frame data inversion setting is valid.

Parameters
__DATAINV__SMARTCARD frame data inversion setting.
Return values
SET(DATAINV is valid) or RESET (DATAINV is invalid)

◆ IS_SMARTCARD_ADVFEATURE_DMAONRXERROR

#define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR (   __DMA__)
Value:
#define SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR
Definition: stm32h7xx_hal_smartcard.h:543
#define SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR
Definition: stm32h7xx_hal_smartcard.h:542

Ensure that SMARTCARD DMA enabling or disabling on error setting is valid.

Parameters
__DMA__SMARTCARD DMA enabling or disabling on error setting.
Return values
SET(DMA is valid) or RESET (DMA is invalid)

◆ IS_SMARTCARD_ADVFEATURE_INIT

#define IS_SMARTCARD_ADVFEATURE_INIT (   __INIT__)
Value:
((__INIT__) <= (SMARTCARD_ADVFEATURE_NO_INIT | \
#define SMARTCARD_ADVFEATURE_SWAP_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:63
#define SMARTCARD_ADVFEATURE_NO_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:59
#define SMARTCARD_ADVFEATURE_DMADISABLEONERROR_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:65
#define SMARTCARD_ADVFEATURE_MSBFIRST_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:66
#define SMARTCARD_ADVFEATURE_TXINVERT_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:60
#define SMARTCARD_ADVFEATURE_RXINVERT_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:61
#define SMARTCARD_ADVFEATURE_RXOVERRUNDISABLE_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:64
#define SMARTCARD_ADVFEATURE_DATAINVERT_INIT
Definition: stm32h7xx_hal_smartcard_ex.h:62

Ensure that SMARTCARD advanced features initialization is valid.

Parameters
__INIT__SMARTCARD advanced features initialization.
Return values
SET(INIT is valid) or RESET (INIT is invalid)

◆ IS_SMARTCARD_ADVFEATURE_MSBFIRST

#define IS_SMARTCARD_ADVFEATURE_MSBFIRST (   __MSBFIRST__)
Value:
(((__MSBFIRST__) == SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE) || \
#define SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE
Definition: stm32h7xx_hal_smartcard.h:552
#define SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE
Definition: stm32h7xx_hal_smartcard.h:553

Ensure that SMARTCARD frame MSB first setting is valid.

Parameters
__MSBFIRST__SMARTCARD frame MSB first setting.
Return values
SET(MSBFIRST is valid) or RESET (MSBFIRST is invalid)

◆ IS_SMARTCARD_ADVFEATURE_RXINV

#define IS_SMARTCARD_ADVFEATURE_RXINV (   __RXINV__)
Value:
(((__RXINV__) == SMARTCARD_ADVFEATURE_RXINV_DISABLE) || \
#define SMARTCARD_ADVFEATURE_RXINV_DISABLE
Definition: stm32h7xx_hal_smartcard.h:502
#define SMARTCARD_ADVFEATURE_RXINV_ENABLE
Definition: stm32h7xx_hal_smartcard.h:503

Ensure that SMARTCARD frame RX inversion setting is valid.

Parameters
__RXINV__SMARTCARD frame RX inversion setting.
Return values
SET(RXINV is valid) or RESET (RXINV is invalid)

◆ IS_SMARTCARD_ADVFEATURE_SWAP

#define IS_SMARTCARD_ADVFEATURE_SWAP (   __SWAP__)
Value:
(((__SWAP__) == SMARTCARD_ADVFEATURE_SWAP_DISABLE) || \
#define SMARTCARD_ADVFEATURE_SWAP_ENABLE
Definition: stm32h7xx_hal_smartcard.h:523
#define SMARTCARD_ADVFEATURE_SWAP_DISABLE
Definition: stm32h7xx_hal_smartcard.h:522

Ensure that SMARTCARD frame RX/TX pins swap setting is valid.

Parameters
__SWAP__SMARTCARD frame RX/TX pins swap setting.
Return values
SET(SWAP is valid) or RESET (SWAP is invalid)

◆ IS_SMARTCARD_ADVFEATURE_TXINV

#define IS_SMARTCARD_ADVFEATURE_TXINV (   __TXINV__)
Value:
(((__TXINV__) == SMARTCARD_ADVFEATURE_TXINV_DISABLE) || \
#define SMARTCARD_ADVFEATURE_TXINV_ENABLE
Definition: stm32h7xx_hal_smartcard.h:493
#define SMARTCARD_ADVFEATURE_TXINV_DISABLE
Definition: stm32h7xx_hal_smartcard.h:492

Ensure that SMARTCARD frame TX inversion setting is valid.

Parameters
__TXINV__SMARTCARD frame TX inversion setting.
Return values
SET(TXINV is valid) or RESET (TXINV is invalid)

◆ IS_SMARTCARD_AUTORETRY_COUNT

#define IS_SMARTCARD_AUTORETRY_COUNT (   __COUNT__)    ((__COUNT__) <= 0x7U)

Check the SMARTCARD autoretry counter value.

Note
The maximum number of retransmissions is 0x7.
Parameters
__COUNT__number of retransmissions.
Return values
Testresult (TRUE or FALSE)

◆ IS_SMARTCARD_BAUDRATE

#define IS_SMARTCARD_BAUDRATE (   __BAUDRATE__)    ((__BAUDRATE__) < 6250001U)

Check the Baud rate range.

Note
The maximum Baud Rate is derived from the maximum clock on H7 (100 MHz) divided by the oversampling used on the SMARTCARD (i.e. 16).
Parameters
__BAUDRATE__Baud rate set by the configuration function.
Return values
Testresult (TRUE or FALSE)

◆ IS_SMARTCARD_BLOCKLENGTH

#define IS_SMARTCARD_BLOCKLENGTH (   __LENGTH__)    ((__LENGTH__) <= 0xFFU)

Check the block length range.

Note
The maximum SMARTCARD block length is 0xFF.
Parameters
__LENGTH__block length.
Return values
Testresult (TRUE or FALSE)

◆ IS_SMARTCARD_CLOCKPRESCALER

#define IS_SMARTCARD_CLOCKPRESCALER (   __CLOCKPRESCALER__)
Value:
(((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV1) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV2) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV4) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV6) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV8) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV10) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV12) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV16) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV32) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV64) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV128) || \
((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV256))
#define SMARTCARD_PRESCALER_DIV64
Definition: stm32h7xx_hal_smartcard.h:481
#define SMARTCARD_PRESCALER_DIV4
Definition: stm32h7xx_hal_smartcard.h:474
#define SMARTCARD_PRESCALER_DIV2
Definition: stm32h7xx_hal_smartcard.h:473
#define SMARTCARD_PRESCALER_DIV10
Definition: stm32h7xx_hal_smartcard.h:477
#define SMARTCARD_PRESCALER_DIV1
Definition: stm32h7xx_hal_smartcard.h:472
#define SMARTCARD_PRESCALER_DIV256
Definition: stm32h7xx_hal_smartcard.h:483
#define SMARTCARD_PRESCALER_DIV6
Definition: stm32h7xx_hal_smartcard.h:475
#define SMARTCARD_PRESCALER_DIV128
Definition: stm32h7xx_hal_smartcard.h:482
#define SMARTCARD_PRESCALER_DIV16
Definition: stm32h7xx_hal_smartcard.h:479
#define SMARTCARD_PRESCALER_DIV32
Definition: stm32h7xx_hal_smartcard.h:480
#define SMARTCARD_PRESCALER_DIV8
Definition: stm32h7xx_hal_smartcard.h:476
#define SMARTCARD_PRESCALER_DIV12
Definition: stm32h7xx_hal_smartcard.h:478

Ensure that SMARTCARD clock Prescaler is valid.

Parameters
__CLOCKPRESCALER__SMARTCARD clock Prescaler value.
Return values
SET(CLOCKPRESCALER is valid) or RESET (CLOCKPRESCALER is invalid)

◆ IS_SMARTCARD_LASTBIT

#define IS_SMARTCARD_LASTBIT (   __LASTBIT__)
Value:
(((__LASTBIT__) == SMARTCARD_LASTBIT_DISABLE) || \
((__LASTBIT__) == SMARTCARD_LASTBIT_ENABLE))
#define SMARTCARD_LASTBIT_ENABLE
Definition: stm32h7xx_hal_smartcard.h:433
#define SMARTCARD_LASTBIT_DISABLE
Definition: stm32h7xx_hal_smartcard.h:432

Ensure that SMARTCARD frame last bit clock pulse setting is valid.

Parameters
__LASTBIT__SMARTCARD frame last bit clock pulse setting.
Return values
SET(LASTBIT is valid) or RESET (LASTBIT is invalid)

◆ IS_SMARTCARD_MODE

#define IS_SMARTCARD_MODE (   __MODE__)    ((((__MODE__) & 0xFFF3U) == 0x00U) && ((__MODE__) != 0x00U))

Ensure that SMARTCARD communication mode is valid.

Parameters
__MODE__SMARTCARD communication mode.
Return values
SET(MODE is valid) or RESET (MODE is invalid)

◆ IS_SMARTCARD_NACK

#define IS_SMARTCARD_NACK (   __NACK__)
Value:
(((__NACK__) == SMARTCARD_NACK_ENABLE) || \
((__NACK__) == SMARTCARD_NACK_DISABLE))
#define SMARTCARD_NACK_DISABLE
Definition: stm32h7xx_hal_smartcard.h:452
#define SMARTCARD_NACK_ENABLE
Definition: stm32h7xx_hal_smartcard.h:453

Ensure that SMARTCARD NACK transmission setting is valid.

Parameters
__NACK__SMARTCARD NACK transmission setting.
Return values
SET(NACK is valid) or RESET (NACK is invalid)

◆ IS_SMARTCARD_ONE_BIT_SAMPLE

#define IS_SMARTCARD_ONE_BIT_SAMPLE (   __ONEBIT__)
Value:
(((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_DISABLE) || \
#define SMARTCARD_ONE_BIT_SAMPLE_ENABLE
Definition: stm32h7xx_hal_smartcard.h:443
#define SMARTCARD_ONE_BIT_SAMPLE_DISABLE
Definition: stm32h7xx_hal_smartcard.h:442

Ensure that SMARTCARD frame sampling is valid.

Parameters
__ONEBIT__SMARTCARD frame sampling.
Return values
SET(ONEBIT is valid) or RESET (ONEBIT is invalid)

◆ IS_SMARTCARD_OVERRUN

#define IS_SMARTCARD_OVERRUN (   __OVERRUN__)
Value:
(((__OVERRUN__) == SMARTCARD_ADVFEATURE_OVERRUN_ENABLE) || \
#define SMARTCARD_ADVFEATURE_OVERRUN_ENABLE
Definition: stm32h7xx_hal_smartcard.h:532
#define SMARTCARD_ADVFEATURE_OVERRUN_DISABLE
Definition: stm32h7xx_hal_smartcard.h:533

Ensure that SMARTCARD frame overrun setting is valid.

Parameters
__OVERRUN__SMARTCARD frame overrun setting.
Return values
SET(OVERRUN is valid) or RESET (OVERRUN is invalid)

◆ IS_SMARTCARD_PARITY

#define IS_SMARTCARD_PARITY (   __PARITY__)
Value:
(((__PARITY__) == SMARTCARD_PARITY_EVEN) || \
((__PARITY__) == SMARTCARD_PARITY_ODD))
#define SMARTCARD_PARITY_EVEN
Definition: stm32h7xx_hal_smartcard.h:391
#define SMARTCARD_PARITY_ODD
Definition: stm32h7xx_hal_smartcard.h:392

Ensure that SMARTCARD frame parity is valid.

Parameters
__PARITY__SMARTCARD frame parity.
Return values
SET(PARITY is valid) or RESET (PARITY is invalid)

◆ IS_SMARTCARD_PHASE

#define IS_SMARTCARD_PHASE (   __CPHA__)    (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))

Ensure that SMARTCARD frame phase is valid.

Parameters
__CPHA__SMARTCARD frame phase.
Return values
SET(CPHA is valid) or RESET (CPHA is invalid)

◆ IS_SMARTCARD_POLARITY

#define IS_SMARTCARD_POLARITY (   __CPOL__)
Value:
(((__CPOL__) == SMARTCARD_POLARITY_LOW)\
|| ((__CPOL__) == SMARTCARD_POLARITY_HIGH))
#define SMARTCARD_POLARITY_LOW
Definition: stm32h7xx_hal_smartcard.h:412
#define SMARTCARD_POLARITY_HIGH
Definition: stm32h7xx_hal_smartcard.h:413

Ensure that SMARTCARD frame polarity is valid.

Parameters
__CPOL__SMARTCARD frame polarity.
Return values
SET(CPOL is valid) or RESET (CPOL is invalid)

◆ IS_SMARTCARD_REQUEST_PARAMETER

#define IS_SMARTCARD_REQUEST_PARAMETER (   __PARAM__)
Value:
(((__PARAM__) == SMARTCARD_RXDATA_FLUSH_REQUEST) || \
#define SMARTCARD_RXDATA_FLUSH_REQUEST
Definition: stm32h7xx_hal_smartcard.h:562
#define SMARTCARD_TXDATA_FLUSH_REQUEST
Definition: stm32h7xx_hal_smartcard.h:563

Ensure that SMARTCARD request parameter is valid.

Parameters
__PARAM__SMARTCARD request parameter.
Return values
SET(PARAM is valid) or RESET (PARAM is invalid)

◆ IS_SMARTCARD_STOPBITS

#define IS_SMARTCARD_STOPBITS (   __STOPBITS__)
Value:
(((__STOPBITS__) == SMARTCARD_STOPBITS_0_5) ||\
((__STOPBITS__) == SMARTCARD_STOPBITS_1_5))
#define SMARTCARD_STOPBITS_1_5
Definition: stm32h7xx_hal_smartcard.h:382
#define SMARTCARD_STOPBITS_0_5
Definition: stm32h7xx_hal_smartcard.h:381

Ensure that SMARTCARD frame number of stop bits is valid.

Parameters
__STOPBITS__SMARTCARD frame number of stop bits.
Return values
SET(STOPBITS is valid) or RESET (STOPBITS is invalid)

◆ IS_SMARTCARD_TIMEOUT

#define IS_SMARTCARD_TIMEOUT (   __TIMEOUT__)
Value:
(((__TIMEOUT__) == SMARTCARD_TIMEOUT_DISABLE) || \
((__TIMEOUT__) == SMARTCARD_TIMEOUT_ENABLE))
#define SMARTCARD_TIMEOUT_DISABLE
Definition: stm32h7xx_hal_smartcard.h:462
#define SMARTCARD_TIMEOUT_ENABLE
Definition: stm32h7xx_hal_smartcard.h:463

Ensure that SMARTCARD receiver timeout setting is valid.

Parameters
__TIMEOUT__SMARTCARD receiver timeout setting.
Return values
SET(TIMEOUT is valid) or RESET (TIMEOUT is invalid)

◆ IS_SMARTCARD_TIMEOUT_VALUE

#define IS_SMARTCARD_TIMEOUT_VALUE (   __TIMEOUTVALUE__)    ((__TIMEOUTVALUE__) <= 0xFFFFFFU)

Check the receiver timeout value.

Note
The maximum SMARTCARD receiver timeout value is 0xFFFFFF.
Parameters
__TIMEOUTVALUE__receiver timeout value.
Return values
Testresult (TRUE or FALSE)

◆ IS_SMARTCARD_WORD_LENGTH

#define IS_SMARTCARD_WORD_LENGTH (   __LENGTH__)    ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B)

Ensure that SMARTCARD frame length is valid.

Parameters
__LENGTH__SMARTCARD frame length.
Return values
SET(LENGTH is valid) or RESET (LENGTH is invalid)

◆ SMARTCARD_GETCLOCKSOURCE

#define SMARTCARD_GETCLOCKSOURCE (   __HANDLE__,
  __CLOCKSOURCE__ 
)

Report the SMARTCARD clock source.

Parameters
__HANDLE__specifies the SMARTCARD Handle.
__CLOCKSOURCE__output variable.
Return values
theSMARTCARD clocking source, written in CLOCKSOURCE.