Files
Matthias 4381f5512f Renamed remotely
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@107 9fe90eed-be63-e94b-8204-d34ff4c2ff93
2009-01-12 08:26:15 +00:00

1 line
3.2 KiB
C

/* ---------------------------------------------------------------------------
* relay_test.c (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 11, 2008, MMi
* Creation.
* ---------------------------------------------------------------------------
*/
/* Channel 0-3: Mainboard Relays; Channel 4-5: Extensionboard Relays */
/* ---------------------------------------------------------------------------
* System include files
* ---------------------------------------------------------------------------
*/
#include <stdio.h>
/* ---------------------------------------------------------------------------
* Application include files
* ---------------------------------------------------------------------------
*/
#include "relay_test.h"
#include "smc4000io.h"
#include "BusProtocol.h"
#include "protocolfunctions.h"
/* ---------------------------------------------------------------------------
* Local constant and macro definitions
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Global variable definitions
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Local variable definitions
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Local function definitions
* ---------------------------------------------------------------------------
*/
void relaySet (UINT8 senderId, UINT8 targetId, UINT8 requestNr,
UINT8 functionId, UINT8 nrOfParams, UINT32 *params)
{
/* nrOfParams = 2
* params[0]: channel
* params[1]: relay value (0: OFF, !0: ON)
*/
printf ("Called function: relaySet");
// WRITE VALUE
}
void relaySetAll (UINT8 senderId, UINT8 targetId, UINT8 requestNr,
UINT8 functionId, UINT8 nrOfParams, UINT32 *params)
{
/* nrOfParams = 2
* params[0]: board type (0: MB, 1: EB)
* params[1]: relay value (0: OFF, !0: ON)
*/
if (params[0] == 0)
{
// MAINBOARD
}
else if (params[0] == 1)
{
// EXTENSIONBOARD
}
printf ("Called function: relaySetAll");
/* Release relay semaphore on calling device with result function */
bpSendRpcResult(bushandler, REMOTEDEVICENUMBER, 22, 1, 0, NULL);
}
void relayMB_test_execute (void)
{
printf ("THIS IS THE RELAY TEST SEQUENCE");
}
void relayEB_test_execute (void)
{
printf ("THIS IS THE RELAY TEST SEQUENCE");
}