STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
Loading...
Searching...
No Matches
Dio_Types.h File Reference

Dio Driver Types More...

#include "Std_Types.h"

Go to the source code of this file.

Data Structures

struct  Dio_ChannelGroupType
 Type for the definition of a channel group, which consists of several adjoining channels within a port. More...
 
struct  _Dio_PinType
 Type for the definitions of a Pin wicch is made of port and pin number. More...
 
struct  _Dio_ConfigType
 Global configuration structures with all the channels and groups. More...
 

Macros

#define DIO_STATIC   static
 
#define DIO_ID_READ_CHANNEL   0x00u
 
#define DIO_ID_WRITE_CHANNEL   0x01u
 
#define DIO_ID_READ_PORT   0x02u
 
#define DIO_ID_WRITE_PORT   0x03u
 
#define DIO_ID_READ_CHANNEL_GRP   0x04u
 
#define DIO_ID_WRITE_CHANNEL_GRP   0x05u
 
#define DIO_ID_GET_VERSION_INFO   0x12u
 
#define DIO_ID_FLIP_CHANNEL   0x11u
 
#define DIO_ID_MASKED_WRITE_PORT   0x13u
 
#define DIO_E_PARAM_INVALID_CHANNEL_ID   0x0Au
 
#define DIO_E_PARAM_INVALID_PORT_ID   0x14u
 
#define DIO_E_PARAM_INVALID_GROUP   0x1Fu
 
#define DIO_E_PARAM_POINTER   0x20u
 

Typedefs

typedef uint8 Dio_ChannelType
 Parameters of type Dio_ChannelType contain the numeric ID of a DIO channel.
 
typedef uint8 Dio_PortType
 Parameters of type Dio_PortType contain the numeric ID of a DIO port.
 
typedef uint8 Dio_LevelType
 The type for the possible levels that a DIO channel can have (input or output).
 
typedef uint32 Dio_PortLevelType
 The type for the value of a DIO port.
 
typedef struct _Dio_PinType Dio_PinType
 Type for the definitions of a Pin wicch is made of port and pin number.
 
typedef struct _Dio_ConfigType Dio_ConfigType
 Global configuration structures with all the channels and groups.
 

Detailed Description

Dio Driver Types

Author
Enrique, Diego Perez

The header contains the type definitions that are used by the Dio module. The file is implemnted as a means of abstraction from the hardware, this way we can avoid to include Arch headers in the actual driver header, making the low level interfaces available for upper layers.

Typedef Documentation

◆ Dio_ChannelType

Parameters of type Dio_ChannelType contain the numeric ID of a DIO channel.

The mapping of the ID is implementation specific but not configurable. Range: This is implementation specific but not all values may be valid within the type. Shall cover all available DIO channels.

Requirement
SWS_Dio_00182

◆ Dio_LevelType

The type for the possible levels that a DIO channel can have (input or output).

Range: STD_LOW 0x00 Physical state 0V. STD_HIGH 0x01 Physical state 5V or 3.3V.

Requirement
SWS_Dio_00185

◆ Dio_PortLevelType

The type for the value of a DIO port.

If the µC owns ports of different port widths (e.g. 4, 8,16...Bit) Dio_PortLevelType inherits the size of the largest port. Range: 0...xxx.

Requirement
SWS_Dio_00186

◆ Dio_PortType

Parameters of type Dio_PortType contain the numeric ID of a DIO port.

The mapping of ID is implementation specific but not configurable. Range: 0 - number of ports. Shall cover all available DIO Ports.

Requirement
SWS_Dio_00183