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

PORT Driver Types More...

#include "Std_Types.h"

Go to the source code of this file.

Data Structures

struct  _Port_PinConfigType
 Definition of the external data structure containing the initialization data More...
 
struct  _Port_ConfigType
 Driver configuration structure More...
 

Macros

#define PORT_STATIC   static
 
#define PORT_E_PARAM_PIN   0x0Au
 
#define PORT_E_DIRECTION_UNCHANGEABLE   0x0Bu
 
#define PORT_E_INIT_FAILED   0x0Cu
 
#define PORT_E_PARAM_INVALID_MODE   0x0Du
 
#define PORT_E_MODE_UNCHANGEABLE   0x0Eu
 
#define PORT_E_UNINIT   0x0Fu
 
#define PORT_E_PARAM_POINTER   0x10u
 
#define PORT_ID_INIT   0x00u
 
#define PORT_ID_SET_PIN_DIRECTION   0x10u
 
#define PORT_ID_SET_PIN_MODE   0x0fu
 
#define PORT_ID_GET_VERSION_INFO   0x03u
 
#define PORT_ID_REFRESH_PORT_DIRECTION   0x04u
 

Typedefs

typedef uint16 Port_PinType
 Data type for the symbolic name of a port pin. the 8 most significant bits represent the port of the pin and the 4 least significatn bits represent the pin.
 
typedef uint8 Port_PinDirectionType
 Data type for the symbolic direction of a pin. range: PORT_PIN_IN and PORT_PIN_OUT.
 
typedef uint8 Port_PinModeType
 Data type for the altern functions of a pin. range: PORT_PIN_MODE_AF0, PORT_PIN_MODE_AF1, PORT_PIN_MODE_AF2, PORT_PIN_MODE_AF3, PORT_PIN_MODE_AF4, PORT_PIN_MODE_AF5, PORT_PIN_MODE_AF6, PORT_PIN_MODE_AF7 and PORT_PIN_MODE_AF8.
 
typedef struct _Port_PinConfigType Port_PinConfigType
 Definition of the external data structure containing the initialization data
 
typedef struct _Port_ConfigType Port_ConfigType
 Driver configuration structure
 

Detailed Description

PORT Driver Types

Author
Diego Perez, Enrique Ortega

The header contains the type definitions that are used by the PORT 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

◆ Port_ConfigType

Driver configuration structure

The Port_ConfigType data structure contains the initialization data for the PORT driver. The Port_Init() function shall initialize all port pins and port-related registers with the values of the structure referenced by the parameter ConfigPtr.

◆ Port_PinConfigType

Definition of the external data structure containing the initialization data

The Port_PortsConfigType data structure holds the initialization information for each port available on the microcontroller. An array of these structures must be defined in the Port_Cfg.c file, with each entry representing a specific port.

Note
It is the responsibility of the user to ensure that the values defined in this structure are valid and appropriate, as the Port Driver does not perform any validation. The values must be generated and validated within the code generation tool.
Requirement
SWS_Port_00228

◆ Port_PinDirectionType

Data type for the symbolic direction of a pin. range: PORT_PIN_IN and PORT_PIN_OUT.

Requirement
SWS_Port_00046

Data type for the symbolic direction of a pin.

◆ Port_PinModeType

Data type for the altern functions of a pin. range: PORT_PIN_MODE_AF0, PORT_PIN_MODE_AF1, PORT_PIN_MODE_AF2, PORT_PIN_MODE_AF3, PORT_PIN_MODE_AF4, PORT_PIN_MODE_AF5, PORT_PIN_MODE_AF6, PORT_PIN_MODE_AF7 and PORT_PIN_MODE_AF8.

Requirement
SWS_Port_00231

Data type for the symbolic mode of a pin.

◆ Port_PinType

Data type for the symbolic name of a port pin. the 8 most significant bits represent the port of the pin and the 4 least significatn bits represent the pin.

Requirement
SWS_Port_00229

Data type for the symbolic name of a port pin.