HAL
hal::PinChangedEvent Class Reference

#include <pin_event.h>

Collaboration diagram for hal::PinChangedEvent:
Collaboration graph

Public Member Functions

 PinChangedEvent (Module *m, PinEvent pev, u32 id)
 
Moduleget_module () const
 
u32 associated_data ()
 
void send ()
 

Friends

class PinChangedEventScope
 
bool pin_event_order (const PinChangedEvent &a, const PinChangedEvent &b)
 

Detailed Description

Wrapper class for core pin_changed events.

Events can be send immediately or stacked and send at according to their priority.

Definition at line 69 of file pin_event.h.

Constructor & Destructor Documentation

◆ PinChangedEvent()

hal::PinChangedEvent::PinChangedEvent ( Module m,
PinEvent  pev,
u32  id 
)

PinChangedEvent class for single event

Parameters
m- The module comprising pins and pin groups
pev- The pin event enum
id- pin or pin group ID

Definition at line 29 of file pin_event.cpp.

Member Function Documentation

◆ associated_data()

u32 hal::PinChangedEvent::associated_data ( )

Return bitwise binary encoded PinEvent and ID 4LSB = The pin event enum as 4 bit int 28HSB = The ID as 28 bit int

Returns
The bitcode according to scheme above

Definition at line 52 of file pin_event.cpp.

Referenced by send().

◆ get_module()

Module * hal::PinChangedEvent::get_module ( ) const

Returns the module for which pins or pin groups have been changed

Returns
The module comprising pins and pin groups

Definition at line 47 of file pin_event.cpp.

◆ send()

Friends And Related Function Documentation

◆ pin_event_order

bool pin_event_order ( const PinChangedEvent a,
const PinChangedEvent b 
)
friend

Function used by sort algorithm to organize events according to their priority.

Parameters
a- Pin changed event A
b- Pin changed event B
Returns
true if A should be handled before B, false otherwise.

Definition at line 57 of file pin_event.cpp.

◆ PinChangedEventScope

friend class PinChangedEventScope
friend

Definition at line 72 of file pin_event.h.


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