pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
pflib::GPIO Class Reference

Representation of GPIO controller in the Polarfire. More...

#include <GPIO.h>

Inheritance diagram for pflib::GPIO:
[legend]
Collaboration diagram for pflib::GPIO:
[legend]

Public Member Functions

 GPIO (WishboneInterface *wb, int target=tgt_GPIO)
 
int getGPOcount ()
 Get the number of GPO bits.
 
int getGPIcount ()
 Get the number of GPI bits.
 
bool getGPI (int ibit)
 Read a GPI bit.
 
std::vector< bool > getGPI ()
 Read all GPI bits.
 
void setGPO (int ibit, bool toTrue)
 Set a single GPO bit.
 
void setGPO (const std::vector< bool > &bits)
 Set all GPO bits.
 
std::vector< bool > getGPO ()
 Read all GPO bits.
 
bool getGPI_single (int ibit)
 convenience wrapper for python bindings
 
std::vector< bool > getGPI_all ()
 
void setGPO_single (int ibit, bool t)
 
void setGPO_all (const std::vector< bool > &b)
 
- Public Member Functions inherited from pflib::WishboneTarget
 WishboneTarget (WishboneInterface *wb, int target)
 simply store pointer to interface and target we will interact with
 
int target_type ()
 Get the Wishbone target type/flavor by number.
 
std::string target_type_str ()
 Get the Wishbone target type/flavor by name if known.
 
int firmware_version ()
 Get the subblock firmware version.
 

Private Attributes

int ngpi_
 Cached numbers of GPI and GPO bits.
 
int ngpo_
 

Additional Inherited Members

- Protected Member Functions inherited from pflib::WishboneTarget
void wb_write (uint32_t addr, uint32_t data)
 Write data to an address on the target stored within us. More...
 
uint32_t wb_read (uint32_t addr)
 Read data from address on the target stored within us. More...
 
void wb_rmw (uint32_t addr, uint32_t data, uint32_t mask)
 Read the word at the address and then put our data bits into that address using the provided mask. More...
 
- Protected Attributes inherited from pflib::WishboneTarget
WishboneInterfacewb_
 Handle to the interface.
 
int target_
 Target id.
 

Detailed Description

Representation of GPIO controller in the Polarfire.


The documentation for this class was generated from the following files: