mikroSDK Reference Manual
drv_port.h File Reference

Go to the source code of this file.

Data Structures

struct  port_t
 Port driver context structure, consisted of the following fields : More...
 

Macros

#define port_read   port_read_output
 Read from port. More...
 

Enumerations

enum  port_err_t
 
enum  pin_direction_t
 

Functions

err_t port_init (port_t *port, port_name_t name, port_size_t mask, pin_direction_t direction)
 Initialize GPIO port. More...
 
err_t port_write (port_t *port, port_size_t value)
 Write to port. More...
 
port_size_t port_read_input (port_t *port)
 Read from port. More...
 
port_size_t port_read_output (port_t *port)
 Read from port. More...
 

Enumeration Type Documentation

◆ port_err_t

enum port_err_t

Return values.

Enumerator
PORT_SUCCESS 

Success.

PORT_ERROR 

Error.

◆ pin_direction_t

Predefined enum values for Port driver pin direction.

Enumerator
PIN_DIRECTION_DIGITAL_INPUT 

Define as digital input.

PIN_DIRECTION_DIGITAL_OUTPUT 

Define as digital output.