added some doc comments
This commit is contained in:
@@ -173,6 +173,7 @@ static void DI_deInit(Unit *unit)
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/** Read request */
|
||||
error_t UU_DI_Read(Unit *unit, uint16_t *packed)
|
||||
{
|
||||
CHECK_TYPE(unit, &UNIT_DIN);
|
||||
|
||||
@@ -9,4 +9,13 @@
|
||||
|
||||
extern const UnitDriver UNIT_DIN;
|
||||
|
||||
/**
|
||||
* Read pins
|
||||
*
|
||||
* @param unit
|
||||
* @param packed - output; the packed (right aligned) bits representing the pins, highest to lowest, are written here.
|
||||
* @return success
|
||||
*/
|
||||
error_t UU_DI_Read(Unit *unit, uint16_t *packed);
|
||||
|
||||
#endif //U_DIN_H
|
||||
|
||||
@@ -9,14 +9,49 @@
|
||||
|
||||
extern const UnitDriver UNIT_DOUT;
|
||||
|
||||
/**
|
||||
* Write pins (e.g. writing 0b10 if configured pins are PA5 and PA0 sets PA5=1,PA0=0)
|
||||
*
|
||||
* @param unit
|
||||
* @param packed - packed pin states (aligned to right)
|
||||
* @return success
|
||||
*/
|
||||
error_t UU_DO_Write(Unit *unit, uint16_t packed);
|
||||
|
||||
/**
|
||||
* Set pins (clear none)
|
||||
*
|
||||
* @param unit
|
||||
* @param packed - packed pins, 1 if pin should be set
|
||||
* @return success
|
||||
*/
|
||||
error_t UU_DO_Set(Unit *unit, uint16_t packed);
|
||||
|
||||
/**
|
||||
* Clear multiple pins
|
||||
*
|
||||
* @param unit
|
||||
* @param packed - packed pins, 1 if pin should be cleared
|
||||
* @return
|
||||
*/
|
||||
error_t UU_DO_Clear(Unit *unit, uint16_t packed);
|
||||
|
||||
/**
|
||||
* Toggle pins
|
||||
*
|
||||
* @param unit
|
||||
* @param packed - packed pins, 1 if pin should be toggled
|
||||
* @return
|
||||
*/
|
||||
error_t UU_DO_Toggle(Unit *unit, uint16_t packed);
|
||||
|
||||
/**
|
||||
* Get number of configured pins
|
||||
*
|
||||
* @param unit
|
||||
* @param count output, written with 0-16
|
||||
* @return success
|
||||
*/
|
||||
error_t UU_DO_GetPinCount(Unit *unit, uint8_t *count);
|
||||
|
||||
#endif //U_DOUT_H
|
||||
|
||||
Reference in New Issue
Block a user