/* --------------------------------------------------------------------------- * remote_analogue.h (c) 2008 Micro-key bv * --------------------------------------------------------------------------- * Micro-key bv * Industrieweg 28, 9804 TG Noordhorn * Postbus 92, 9800 AB Zuidhorn * The Netherlands * Tel: +31 594 503020 * Fax: +31 594 505825 * Email: support@microkey.nl * Web: www.microkey.nl * --------------------------------------------------------------------------- * Description: * --------------------------------------------------------------------------- * Version(s): 0.1, Dez 15, 2008, MMi * Creation. * --------------------------------------------------------------------------- */ #ifndef REMOTE_ANALOGUE_H_ #define REMOTE_ANALOGUE_H_ /* --------------------------------------------------------------------------- * System include files. * --------------------------------------------------------------------------- */ #include "LPC23xx.h" #include "types.h" /* --------------------------------------------------------------------------- * Application include files. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Constant and macro definitions. * --------------------------------------------------------------------------- */ #define NUMBER_OF_AI_MB 8 #define NUMBER_OF_AO_MB 8 #define NUMBER_OF_AI_EB 4 #define NUMBER_OF_AO_EB 4 #define NUMBER_OF_TOTAL_AI (NUMBER_OF_AI_MB + NUMBER_OF_AI_EB) #define NUMBER_OF_TOTAL_AO (NUMBER_OF_AO_MB + NUMBER_OF_AO_EB) /* --------------------------------------------------------------------------- * Type definitions. * --------------------------------------------------------------------------- */ typedef enum { analogue_mb = 0, analogue_eb = 1 } t_boardtype_analogue; /* --------------------------------------------------------------------------- * Variable declarations. * --------------------------------------------------------------------------- */ INT32 remoteAnalogueInputs[(NUMBER_OF_TOTAL_AI)]; INT32 remoteAnalogueOutputs[(NUMBER_OF_TOTAL_AO)]; xSemaphoreHandle remoteAnalogueSemaphore; /* --------------------------------------------------------------------------- * Function declarations. * --------------------------------------------------------------------------- */ void remoteAioInit (void); RESULT remoteAioWrite (UINT8 device, UINT8 channel, INT32 value); RESULT remoteAioWriteAll (UINT8 device, t_boardtype_analogue board, BOOLEAN value); UINT32 remoteAioRead (UINT8 device, UINT8 channel); void remoteAioReadAll (UINT8 device, t_boardtype_analogue board); void remoteAnalogueSemaphoreRelease (UINT8 requestNr, UINT8 nrOfResults, UINT32 *results); void analogueReadResult (UINT8 requestNr, UINT8 nrOfResults, UINT32 *results); void analogueReadAllResult (UINT8 requestNr, UINT8 nrOfResults, UINT32 *results); #endif /*REMOTE_ANALOGUE_H_*/