373a8c32b2
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
74 lines
2.7 KiB
C
74 lines
2.7 KiB
C
/* ---------------------------------------------------------------------------
|
|
* remote_relay.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 16, 2008, MMi
|
|
* Creation.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#ifndef REMOTE_RELAY_H_
|
|
#define REMOTE_RELAY_H_
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* System include files.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#include "LPC23xx.h"
|
|
#include "types.h"
|
|
/* ---------------------------------------------------------------------------
|
|
* Application include files.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Constant and macro definitions.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
#define NUMBER_OF_RLY_MB 4
|
|
#define NUMBER_OF_RLY_EB 2
|
|
#define NUMBER_OF_TOTAL_RLY (NUMBER_OF_RLY_MB + NUMBER_OF_RLY_EB)
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
* Type definitions.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
typedef enum
|
|
{
|
|
relay_mb = 0,
|
|
relay_eb = 1
|
|
} t_boardtype_relay;
|
|
/* ---------------------------------------------------------------------------
|
|
* Variable declarations.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
BOOLEAN remoteRelayInputs[(NUMBER_OF_TOTAL_RLY)];
|
|
|
|
xSemaphoreHandle remoteRelaySemaphore;
|
|
/* ---------------------------------------------------------------------------
|
|
* Function declarations.
|
|
* ---------------------------------------------------------------------------
|
|
*/
|
|
|
|
void remoteRelayInit(void);
|
|
|
|
RESULT remoteRelaySet (UINT8 device, UINT8 channel, BOOLEAN value);
|
|
|
|
BOOLEAN remoteRelayRead (UINT8 device, UINT8 channel);
|
|
|
|
RESULT remoteRelaySetAll (UINT8 device, t_boardtype_relay board, BOOLEAN value);
|
|
|
|
void remoteRelaySemaphoreRelease (UINT8 requestNr, UINT8 nrOfResults, UINT32 *results);
|
|
|
|
|
|
#endif /*REMOTE_RELAY_H_*/
|