1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

Merge branch 'master' of git@github.com:preble/P-ROC

This commit is contained in:
gstellenberg
2009-05-30 13:18:47 -05:00
3 changed files with 5 additions and 6 deletions

View File

@@ -145,7 +145,7 @@ typedef struct PRDriverGroupConfig {
typedef struct PRDriverState { typedef struct PRDriverState {
uint16_t driverNum; uint16_t driverNum;
uint32_t outputDriveTime; uint8_t outputDriveTime;
bool_t polarity; bool_t polarity;
bool_t state; bool_t state;
bool_t waitForFirstTimeSlot; bool_t waitForFirstTimeSlot;
@@ -179,7 +179,7 @@ PR_EXPORT PRResult PRDriverDisable(PRHandle handle, uint16_t driverNum);
* Pulses the given driver for a number of milliseconds. * Pulses the given driver for a number of milliseconds.
* This function is provided for convenience. See PRDriverStatePulse() for a full description. * This function is provided for convenience. See PRDriverStatePulse() for a full description.
*/ */
PR_EXPORT PRResult PRDriverPulse(PRHandle handle, uint16_t driverNum, int milliseconds); PR_EXPORT PRResult PRDriverPulse(PRHandle handle, uint16_t driverNum, uint8_t milliseconds);
/** /**
* Assigns a repeating schedule to the given driver. * Assigns a repeating schedule to the given driver.
* This function is provided for convenience. See PRDriverStateSchedule() for a full description. * This function is provided for convenience. See PRDriverStateSchedule() for a full description.
@@ -203,7 +203,7 @@ PR_EXPORT void PRDriverStateDisable(PRDriverState *driverState);
* @param milliseconds Number of milliseconds to pulse the driver for. * @param milliseconds Number of milliseconds to pulse the driver for.
* @note The driver state structure must be applied using PRDriverUpdateState() or linked to a switch rule using PRSwitchUpdateRule() to have any effect. * @note The driver state structure must be applied using PRDriverUpdateState() or linked to a switch rule using PRSwitchUpdateRule() to have any effect.
*/ */
PR_EXPORT void PRDriverStatePulse(PRDriverState *driverState, int milliseconds); PR_EXPORT void PRDriverStatePulse(PRDriverState *driverState, uint8_t milliseconds);
/** /**
* Changes the given #PRDriverState to reflect a scheduled state. * Changes the given #PRDriverState to reflect a scheduled state.
* Assigns a repeating schedule to the given driver. * Assigns a repeating schedule to the given driver.

View File

@@ -143,7 +143,6 @@ int32_t CreateWatchdogConfigBurst ( uint32_t * burst, bool_t watchdogExpired,
int32_t CreateSwitchUpdateConfigBurst ( uint32_t * burst, PRSwitchConfig *switchConfig) int32_t CreateSwitchUpdateConfigBurst ( uint32_t * burst, PRSwitchConfig *switchConfig)
{ {
uint32_t addr; uint32_t addr;
uint32_t i;
addr = 0; addr = 0;
burst[0] = CreateBurstCommand (P_ROC_BUS_SWITCH_CTRL_SELECT, addr, 1 ); burst[0] = CreateBurstCommand (P_ROC_BUS_SWITCH_CTRL_SELECT, addr, 1 );

View File

@@ -124,7 +124,7 @@ PR_EXPORT PRResult PRDriverDisable(PRHandle handle, uint16_t driverNum)
PRDriverStateDisable(&driver); PRDriverStateDisable(&driver);
return handleAsDevice->DriverUpdateState(&driver); return handleAsDevice->DriverUpdateState(&driver);
} }
PR_EXPORT PRResult PRDriverPulse(PRHandle handle, uint16_t driverNum, int milliseconds) PR_EXPORT PRResult PRDriverPulse(PRHandle handle, uint16_t driverNum, uint8_t milliseconds)
{ {
PRDriverState driver; PRDriverState driver;
handleAsDevice->DriverGetState(driverNum, &driver); handleAsDevice->DriverGetState(driverNum, &driver);
@@ -160,7 +160,7 @@ PR_EXPORT void PRDriverStateDisable(PRDriverState *driver)
driver->patterOffTime = 0; driver->patterOffTime = 0;
driver->patterEnable = false; driver->patterEnable = false;
} }
PR_EXPORT void PRDriverStatePulse(PRDriverState *driver, int milliseconds) PR_EXPORT void PRDriverStatePulse(PRDriverState *driver, uint8_t milliseconds)
{ {
driver->state = 1; driver->state = 1;
driver->timeslots = 0; driver->timeslots = 0;