PDL for FM0+  Version1.0
Peripheral Driverl Library for FM0+
C:/pdl_v10/common/base_types.h File Reference
#include <stddef.h>
#include "stdint.h"
Include dependency graph for base_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TRUE   ((boolean_t) 1)
#define FALSE   ((boolean_t) 0)
#define MIN(X, Y)   ((X) < (Y) ? (X) : (Y))
#define MAX(X, Y)   ((X) > (Y) ? (X) : (Y))
#define DIM(X)   (sizeof(X) / sizeof(X[0]))

Typedefs

typedef uint8_t boolean_t
typedef float float32_t
typedef double float64_t
typedef char char_t
typedef void(* func_ptr_t )(void)
typedef void(* func_ptr_arg1_t )(uint8_t)
typedef enum en_result en_result_t

Enumerations

enum  en_result {
  Ok = 0, Error = 1, ErrorAddressAlignment = 2, ErrorAccessRights = 3,
  ErrorInvalidParameter = 4, ErrorOperationInProgress = 5, ErrorInvalidMode = 6, ErrorUninitialized = 7,
  ErrorBufferFull = 8, ErrorTimeout = 9, ErrorNotReady = 10, OperationInProgress = 11
}

Detailed Description

Additional base type definitions to stddef.h and stdint.h

History:

  • 2013-03-21 1.0 MWi First version.

Definition in file base_types.h.


Define Documentation

#define DIM (   X)    (sizeof(X) / sizeof(X[0]))

Returns the dimension of an array

Definition at line 80 of file base_types.h.

#define MAX (   X,
 
)    ((X) > (Y) ? (X) : (Y))

Returns the maximum value out of two values

Definition at line 77 of file base_types.h.

#define MIN (   X,
 
)    ((X) < (Y) ? (X) : (Y))

Returns the minimum value out of two values

Definition at line 74 of file base_types.h.

#define TRUE   ((boolean_t) 1)

Value is true (boolean_t type)

Definition at line 65 of file base_types.h.

Referenced by Adc_DisableInt(), Adc_Enable(), Adc_EnableInt(), Adc_GetStatus(), Adc_Init(), Clk_EnableHscr(), Clk_EnableMainClock(), Clk_EnablePllClock(), Clk_EnableSubClock(), Clk_Init(), Clk_PeripheralGetClockState(), Clk_SetSource(), CsioMasterRxIntCallback(), CsioMasterTxIntCallback(), CsioRxData(), CsioRxReg(), CsioTxCmd(), CsioTxCmdAddr(), CsioTxData(), Csv_GetCsvFailCause(), Dma_DisableInt(), Dma_EnableInt(), Dma_Init_Channel(), Dma_SetChannel(), Dt_EnableCount(), Dt_EnableInt(), Dt_GetIntFlag(), Dt_GetMaskIntFlag(), Dt_Init(), DtIrqHandler(), Hwwdg_EnableDbgBrkWdgCtl(), Hwwdg_Init(), Hwwdg_Start(), Hwwdg_Stop(), HwwdgIrqHandler(), I2cCheckErrorStatus(), I2cIntCallback(), I2cRead(), I2cRestart(), I2cRxData(), I2cSendData(), I2cStart(), I2cStop(), I2cStopDetectCallback(), I2cTxCallback(), I2cTxData(), I2cTxRxData(), Lpm_ConfigSubClk(), Lvd_GetIntStatus(), MFlash_ChipErase(), Mfs_Csio_DeInit(), Mfs_Csio_DisableInt(), Mfs_Csio_EnableInt(), Mfs_Csio_GetStatus(), Mfs_Csio_Init(), Mfs_Csio_SendData(), Mfs_Csio_SetCsHoldStatus(), Mfs_I2c_DeInit(), Mfs_I2c_DisableInt(), Mfs_I2c_EnableInt(), Mfs_I2c_GetStatus(), Mfs_I2c_Init(), Mfs_Lin_DeInit(), Mfs_Lin_DisableInt(), Mfs_Lin_EnableInt(), Mfs_Lin_GetStatus(), Mfs_Lin_Init(), Mfs_Uart_DeInit(), Mfs_Uart_DisableInt(), Mfs_Uart_EnableInt(), Mfs_Uart_GetStatus(), Mfs_Uart_Init(), Mft_Icu_IrqHandler(), Mft_Icu_SelFrt(), Mft_Wfg_DisableDtifInt(), Mft_Wfg_EnableDtifInt(), putchar(), Qprc_DisableInt(), Qprc_EnableInt(), Qprc_Init(), Reset_GetCause(), Rtc_DisableInt(), Rtc_EnableInt(), Rtc_GetStatus(), Rtc_Init(), Rtc_IrqHandler(), Rtc_SetDateTime(), S25fl127s_4kSectorErase(), S25fl127s_BulkErase(), S25fl127s_Init(), S25fl127s_PageProgram(), S25fl127s_SectorErase(), Swwdg_EnableDbgBrkWdgCtl(), Swwdg_Init(), Swwdg_Start(), Swwdg_Stop(), and SwwdgIrqHandler().


Typedef Documentation

typedef uint8_t boolean_t

logical datatype (only values are TRUE and FALSE)

Definition at line 87 of file base_types.h.

typedef char char_t

ASCCI character for string generation (8 bit)

Definition at line 96 of file base_types.h.

typedef enum en_result en_result_t

generic error codes

typedef float float32_t

single precision floating point number (4 byte)

Definition at line 90 of file base_types.h.

typedef double float64_t

double precision floating point number (8 byte)

Definition at line 93 of file base_types.h.

typedef void(* func_ptr_arg1_t)(uint8_t)

function pointer type to void/uint8_t function

Definition at line 102 of file base_types.h.

typedef void(* func_ptr_t)(void)

function pointer type to void/void function

Definition at line 99 of file base_types.h.


Enumeration Type Documentation

enum en_result

generic error codes

Enumerator:
Ok 

No error.

Error 

Non-specific error code.

ErrorAddressAlignment 

Address alignment does not match.

ErrorAccessRights 

Wrong mode (e.g. user/system) mode is set.

ErrorInvalidParameter 

Provided parameter is not valid.

ErrorOperationInProgress 

A conflicting or requested operation is still in progress.

ErrorInvalidMode 

Operation not allowed in current mode.

ErrorUninitialized 

Module (or part of it) was not initialized properly.

ErrorBufferFull 

Circular buffer can not be written because the buffer is full.

ErrorTimeout 

Time Out error occurred (e.g. I2C arbitration lost, Flash time-out, etc.)

ErrorNotReady 

A requested final state is not reached.

OperationInProgress 

Indicator for operation in progress (e.g. ADC conversion not finished, DMA channel used, etc.)

Definition at line 105 of file base_types.h.