Added Software projects
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,131 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* BpMessageFormat.c - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpMessageFormat.h"
|
||||
#include "Crc.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/** \brief Calculates the CRC over payload etc... and sets unique start byte
|
||||
*
|
||||
* \param msg Message over which the CRC should be calculated
|
||||
*/
|
||||
void bpmsgEncodeMessage( t_bpmsg_message * msg )
|
||||
{
|
||||
UINT16 crc;
|
||||
|
||||
crc = crcCalc( &msg->payloadSize, 1, 0);
|
||||
crc = crcCalc( msg->payload, msg->payloadSize, crc);
|
||||
|
||||
msg->crc = crc;
|
||||
}
|
||||
|
||||
|
||||
void bpmsgAdd16bit(UINT8 *payloadlocation, UINT16 data)
|
||||
{
|
||||
UINT8 index = 0;
|
||||
|
||||
payloadlocation[index] = (UINT8)(data >> 8);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data & 0x00FF);
|
||||
}
|
||||
|
||||
|
||||
void bpmsgAdd32bit(UINT8 *payloadlocation, UINT32 data)
|
||||
{
|
||||
UINT8 index = 0;
|
||||
|
||||
payloadlocation[index] = (UINT8)(data >> 24);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data >> 16);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data >> 8);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data & 0xFF);
|
||||
|
||||
}
|
||||
|
||||
UINT8 bpmsgGet8bit(UINT8 *payload, UINT8 *payloadIndex)
|
||||
{
|
||||
UINT8 result;
|
||||
|
||||
result = (UINT8)payload[*payloadIndex];
|
||||
(*payloadIndex)++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
UINT16 bpmsgGet16bit(UINT8 *payload, UINT8 *payloadIndex)
|
||||
{
|
||||
UINT16 result;
|
||||
|
||||
result = ((UINT16)payload[*payloadIndex]) << 8;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT16)payload[*payloadIndex] & 0x00FF);
|
||||
(*payloadIndex)++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
UINT32 bpmsgGet32bit(UINT8 *payload, UINT8 *payloadIndex)
|
||||
{
|
||||
UINT32 result;
|
||||
|
||||
result = ((UINT32)payload[*payloadIndex]) << 24;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT32)payload[*payloadIndex]) << 16;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT32)payload[*payloadIndex]) << 8;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT32)payload[*payloadIndex] & 0x000000FF);
|
||||
(*payloadIndex)++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* BpMessageFormat.h - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __BPMESSAGEFORMAT_H__
|
||||
#define __BPMESSAGEFORMAT_H__
|
||||
/** \file BpMessageFormat.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define BPMSG_STARTBYTE (0xAA)
|
||||
|
||||
#define BPMSG_MSGID_PASSTURN (0x00)
|
||||
#define BPMSG_MSGID_RESETCLIENT (0x01)
|
||||
#define BPMSG_MSGID_GIVEELECTRONICSTATUS (0x02)
|
||||
#define BPMSG_MSGID_SETDACVALUE (0x03)
|
||||
#define BPMSG_MSGID_SETDIGITALOUTVALUE (0x04)
|
||||
#define BPMSG_MSGID_SETADCMODE (0x05)
|
||||
#define BPMSG_MSGID_SETALLDIGITALOUT (0x06)
|
||||
#define BPMSG_MSGID_SETALLDACVALUES (0x07)
|
||||
#define BPMSG_MSGID_SETALLDOUTPUT (0x08)
|
||||
#define BPMSG_MSGID_CALLRPC (0x10)
|
||||
#define BPMSG_MSGID_GIVERPCRESULTS (0x11)
|
||||
|
||||
#define BPMSG_BROADCAST_ID (0xFF)
|
||||
#define BPMSG_MASTER_DEVID (0x01)
|
||||
#define BPMSG_STATUS_FINISHEDSENDING (0xC0)
|
||||
#define BPMSG_STATUS_BUSYSENDING (0x40)
|
||||
#define BPMSG_DACMODE_VOLTAGE (0x00)
|
||||
#define BPMSG_DACMODE_CURRENT (0x01)
|
||||
#define BPMSG_ADCMODE_VOLTAGE (0x00)
|
||||
#define BPMSG_ADCMODE_CURRENT (0x01)
|
||||
#define BPMSG_RPC_ERRORRESULT (0xFF)
|
||||
|
||||
#define BPMSG_UINT32_SIZE (4)
|
||||
#define BPMSG_UINT16_SIZE (2)
|
||||
#define BPMSG_UINT8_SIZE (1)
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef struct t_BPMSG_MESSAGE {
|
||||
UINT8 uniqueStartByte;
|
||||
UINT8 senderId;
|
||||
UINT8 targetId;
|
||||
UINT8 packetNr;
|
||||
UINT8 status;
|
||||
UINT8 messageId;
|
||||
UINT8 payloadSize;
|
||||
UINT8 *payload;
|
||||
UINT16 crc;
|
||||
} t_bpmsg_message;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** \brief Calculates the CRC over payload and sets unique start byte */
|
||||
void bpmsgEncodeMessage( t_bpmsg_message * msg );
|
||||
void bpmsgAdd16bit(UINT8 *payloadlocation, UINT16 data);
|
||||
void bpmsgAdd32bit(UINT8 *payloadlocation, UINT32 data);
|
||||
UINT8 bpmsgGet8bit(UINT8 *payload, UINT8 *payloadIndex);
|
||||
UINT16 bpmsgGet16bit(UINT8 *payload, UINT8 *payloadIndex);
|
||||
UINT32 bpmsgGet32bit(UINT8 *payload, UINT8 *payloadIndex);
|
||||
|
||||
#endif /* __BPMESSAGEFORMAT_H__ */
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include "BpPort.h"
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
portTickType xTaskGetTickCount()
|
||||
{
|
||||
struct timeval tv;
|
||||
portTickType result;
|
||||
unsigned long intermediate;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
intermediate = tv.tv_sec * 1000;
|
||||
result = intermediate + (tv.tv_usec / 1000);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* BpPort.h - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __BPPORT_H__
|
||||
#define __BPPORT_H__
|
||||
/** \file BpPort.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <malloc.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h> // Required for usleep
|
||||
#include <mqueue.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef pthread_t xTaskHandle;
|
||||
//typedef mqd_t xQueueHandle;
|
||||
typedef long portTickType;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
//void *pvPortMalloc( size_t xWantedSize );
|
||||
#define pvPortMalloc(wantedsize) malloc(wantedsize)
|
||||
|
||||
//void vPortFree( void *pv );
|
||||
#define vPortFree(buffer) free(buffer)
|
||||
|
||||
//
|
||||
// signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode,
|
||||
// const signed portCHAR * pcName,
|
||||
// unsigned portSHORT usStackDepth,
|
||||
// void *pvParameters,
|
||||
// unsigned portBASE_TYPE uxPriority,
|
||||
// xTaskHandle *pvCreatedTask );
|
||||
//
|
||||
// extern int pthread_create (pthread_t *__restrict __newthread,
|
||||
// __const pthread_attr_t *__restrict __attr,
|
||||
// void *(*__start_routine) (void *),
|
||||
// void *__restrict __arg) __THROW __nonnull ((1, 3));
|
||||
//
|
||||
#define xTaskCreate(start_function, name, stackdepth, params, priority, handle) \
|
||||
pthread_create(handle, NULL, start_function, params)
|
||||
|
||||
//
|
||||
// void vTaskDelete( xTaskHandle pxTask );
|
||||
//
|
||||
// void pthread_exit(void *value_ptr);
|
||||
//
|
||||
// note: Het deleten van een taak moet nog worden uitgezocht. Waarschijnlijk kan de thread niet zomaar gestopt worden
|
||||
#define vTaskDelete( a ) // pthread_exit( a )
|
||||
|
||||
//
|
||||
// portTickType xTaskGetTickCount( void );
|
||||
//
|
||||
// ?
|
||||
//
|
||||
portTickType xTaskGetTickCount();
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
// void usleep(unsigned long usec);
|
||||
//
|
||||
#define vTaskDelay( msec ) usleep( 1000 * msec );
|
||||
|
||||
//
|
||||
// xQueueHandle xQueueCreate( unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize );
|
||||
//
|
||||
// extern mqd_t mq_open (const char *__name, int __oflag, ...) __THROW;
|
||||
//
|
||||
|
||||
//
|
||||
// signed portBASE_TYPE xQueueGenericReceive( xQueueHandle xQueue, const void * const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeek );
|
||||
//
|
||||
// #define xQueueReceive( xQueue, pvBuffer, xTicksToWait ) xQueueGenericReceive( xQueue, pvBuffer, xTicksToWait, pdFALSE )
|
||||
//
|
||||
// /* Receive the oldest from highest priority messages in message queue
|
||||
// MQDES. */
|
||||
// extern ssize_t mq_receive (mqd_t __mqdes, char *__msg_ptr, size_t __msg_len,
|
||||
// unsigned int *__msg_prio);
|
||||
//
|
||||
//#define xQueueReceive( handle, buffer, ticks2wait )
|
||||
|
||||
//
|
||||
// signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition );
|
||||
//
|
||||
// #define xQueueSendToBack( xQueue, pvItemToQueue, xTicksToWait ) xQueueGenericSend( xQueue, pvItemToQueue, xTicksToWait, queueSEND_TO_BACK )
|
||||
//
|
||||
// /* Add message pointed by MSG_PTR to message queue MQDES. */
|
||||
// extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
|
||||
// unsigned int __msg_prio);
|
||||
//
|
||||
|
||||
#endif /* __BPPORT_H__ */
|
||||
|
||||
@@ -0,0 +1,680 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* BusProtocol.c - v0.1 (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, Jan 28, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "BusProtocol.h"
|
||||
#include "ProtocolThread.h"
|
||||
#include "MessageHandlerQueue.h"
|
||||
#include "RemoteProcedureCalls.h"
|
||||
#include "RpcResults.h"
|
||||
#include "bus.h"
|
||||
//#include "ElecStatusCache.h"
|
||||
#include "mem_mod.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef struct t_BP_ADMIN {
|
||||
UINT8 deviceId;
|
||||
UINT8 rpcRequestNr;
|
||||
int rpcHandle;
|
||||
int rpcrHandle;
|
||||
int bpthreadHandle;
|
||||
int messageHandlerHandle;
|
||||
} t_bp_admin;
|
||||
|
||||
memman *bpMessagePool;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static void WriteElectricStatusCallback( int handle, BOOLEAN isDigital, UINT8 device, UINT8 channel, UINT16 value );
|
||||
|
||||
/** \brief Initialises the BusProtocol
|
||||
*
|
||||
* \param bus The bus to communicate on
|
||||
* \param deviceId the bus identity for this device
|
||||
* \retval the handle for the BusProtocol-driver (0 = unsuccesfull)
|
||||
*/
|
||||
int bpInit( t_bus_devices bus, UINT8 deviceId, UINT8 highestDeviceId, UINT8 inputQueueSize )
|
||||
{
|
||||
t_bp_admin *newBusProtocol = (t_bp_admin *)pvPortMalloc( sizeof(t_bp_admin));
|
||||
|
||||
if (newBusProtocol != NULL)
|
||||
{
|
||||
// Fill administration
|
||||
newBusProtocol->deviceId = deviceId;
|
||||
newBusProtocol->rpcRequestNr = 0;
|
||||
newBusProtocol->rpcHandle = rpcInit();
|
||||
newBusProtocol->rpcrHandle = rpcrInit();
|
||||
newBusProtocol->messageHandlerHandle = mhqInit();
|
||||
|
||||
// Allocate payload queue
|
||||
bpMessagePool = Memmod_Create( inputQueueSize, 64); // Make sure size is dividable by 4
|
||||
|
||||
// Register RPC Callback
|
||||
mhqAdd( newBusProtocol->messageHandlerHandle, BPMSG_MSGID_CALLRPC, rpcRequestHandler, newBusProtocol->rpcHandle );
|
||||
|
||||
// Register RPC-result Callback
|
||||
mhqAdd( newBusProtocol->messageHandlerHandle, BPMSG_MSGID_GIVERPCRESULTS, rpcrRequestHandler, newBusProtocol->rpcrHandle );
|
||||
|
||||
// Register Write electronic status callbac )
|
||||
bpecAttachWriteCallback(newBusProtocol, WriteElectricStatusCallback);
|
||||
|
||||
// Open bus
|
||||
busInit(bus);
|
||||
|
||||
// Create & start thread to poll bus
|
||||
newBusProtocol->bpthreadHandle = bpthreadStart( bus, deviceId, highestDeviceId, (int)newBusProtocol, newBusProtocol->messageHandlerHandle );
|
||||
}
|
||||
|
||||
return (int)newBusProtocol;
|
||||
}
|
||||
|
||||
/** \brief Closes the active BusProtocol
|
||||
*
|
||||
* \post Protocol on this handle cannot be used anymore
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
*/
|
||||
void bpDeinit( int handle )
|
||||
{
|
||||
// Stop & Destroy the bus poll thread
|
||||
|
||||
// Close bus
|
||||
/* \todo busDeinit( (t_bp_admin *)handle)->bus ); */
|
||||
|
||||
rpcDeinit( ((t_bp_admin *)handle)->rpcHandle );
|
||||
rpcrDeinit( ((t_bp_admin *)handle)->rpcrHandle );
|
||||
bpthreadStop( ((t_bp_admin *)handle)->bpthreadHandle );
|
||||
|
||||
// Free BusProtocol-administration
|
||||
vPortFree( (void *)handle );
|
||||
}
|
||||
|
||||
|
||||
/** \brief Indicates whether a message a device is received in the last 10 seconds
|
||||
* Only used by the master
|
||||
*/
|
||||
BOOLEAN bpDeviceIsDetected( int handle, UINT8 deviceId )
|
||||
{
|
||||
return bpthreadDeviceIsDetected(((t_bp_admin *)handle)->bpthreadHandle, deviceId);
|
||||
}
|
||||
|
||||
|
||||
/** \brief Sends message to pass turn (Nothing to send)
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
*/
|
||||
void bpSendPassTurn( int handle )
|
||||
{
|
||||
t_bpmsg_message sendPassTurnMessage;
|
||||
|
||||
BP_DEBUG_OUT('p');BP_DEBUG_OUT('>');
|
||||
|
||||
// Create new message
|
||||
sendPassTurnMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendPassTurnMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendPassTurnMessage.targetId = BPMSG_BROADCAST_ID;
|
||||
sendPassTurnMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendPassTurnMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendPassTurnMessage.messageId = BPMSG_MSGID_PASSTURN;
|
||||
sendPassTurnMessage.payloadSize = 0;
|
||||
sendPassTurnMessage.payload = NULL;
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendPassTurnMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendPassTurnMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message to reset another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param deviceId Identity of targeted bus device (0xFF = all devices)
|
||||
*/
|
||||
void bpSendResetClient( int handle, UINT8 deviceId )
|
||||
{
|
||||
t_bpmsg_message sendResetClientMessage;
|
||||
|
||||
// Create new message
|
||||
sendResetClientMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendResetClientMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendResetClientMessage.targetId = deviceId;
|
||||
sendResetClientMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendResetClientMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendResetClientMessage.messageId = BPMSG_MSGID_RESETCLIENT;
|
||||
sendResetClientMessage.payloadSize = 0;
|
||||
sendResetClientMessage.payload = NULL;
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendResetClientMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendResetClientMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message with all electronic information (DAC's, ADC's and digital I/O)
|
||||
*
|
||||
* Broadcasts the electronic status of the device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param nrOfAdcValues Number of ADC-values included in the message
|
||||
* \param adcValues Pointer to a UINT16 array
|
||||
* \param nrOfDacValues Number of DAC-values included in the message
|
||||
* \param dacValues Pointer to a UINT16 array
|
||||
* \param nrOfDiValues Number of digital input values included in the message
|
||||
* \param diValues Digital input channel values (8 channels per byte)
|
||||
* \param nrOfDoValues Number of digital output values inculded in the message
|
||||
* \param doValues Digital output channel values (8 channels per byte)
|
||||
*/
|
||||
void bpSendGiveElectronicStatus( int handle,
|
||||
UINT8 nrOfAdcValues,
|
||||
UINT16 *adcValues,
|
||||
UINT8 nrOfDacValues,
|
||||
UINT16 *dacValues,
|
||||
UINT8 nrOfDiValues,
|
||||
UINT8 *diValues,
|
||||
UINT8 nrOfDoValues,
|
||||
UINT8 *doValues
|
||||
)
|
||||
{
|
||||
t_bpmsg_message sendGiveElectronicStatusMessage;
|
||||
UINT8 *payload;
|
||||
UINT16 payloadSize;
|
||||
UINT8 payloadIndex = 0;
|
||||
UINT8 index;
|
||||
|
||||
// Determine payload size
|
||||
payloadSize = BPMSG_UINT8_SIZE;
|
||||
payloadSize += nrOfAdcValues * BPMSG_UINT16_SIZE;
|
||||
payloadSize += BPMSG_UINT8_SIZE;
|
||||
payloadSize += nrOfDacValues * BPMSG_UINT16_SIZE;
|
||||
payloadSize += BPMSG_UINT8_SIZE;
|
||||
payloadSize += nrOfDiValues * BPMSG_UINT8_SIZE;
|
||||
payloadSize += BPMSG_UINT8_SIZE;
|
||||
payloadSize += nrOfDoValues * BPMSG_UINT8_SIZE;
|
||||
|
||||
payload = (UINT8 *)Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
// Create new message
|
||||
sendGiveElectronicStatusMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendGiveElectronicStatusMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendGiveElectronicStatusMessage.targetId = BPMSG_BROADCAST_ID;
|
||||
sendGiveElectronicStatusMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendGiveElectronicStatusMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendGiveElectronicStatusMessage.messageId = BPMSG_MSGID_GIVEELECTRONICSTATUS;
|
||||
sendGiveElectronicStatusMessage.payloadSize = payloadSize;
|
||||
sendGiveElectronicStatusMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[payloadIndex] = nrOfAdcValues;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
for (index = 0; index < nrOfAdcValues; index++)
|
||||
{
|
||||
bpmsgAdd16bit( &payload[payloadIndex], adcValues[index]);
|
||||
payloadIndex += BPMSG_UINT16_SIZE;
|
||||
}
|
||||
|
||||
payload[payloadIndex] = nrOfDacValues;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
for (index = 0; index < nrOfDacValues; index++)
|
||||
{
|
||||
bpmsgAdd16bit( &payload[payloadIndex], dacValues[index]);
|
||||
payloadIndex += BPMSG_UINT16_SIZE;
|
||||
}
|
||||
|
||||
payload[payloadIndex] = nrOfDiValues;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
for (index = 0; index < nrOfDiValues; index++)
|
||||
{
|
||||
payload[payloadIndex] = diValues[index];
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
}
|
||||
|
||||
payload[payloadIndex] = nrOfDoValues;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
for (index = 0; index < nrOfDoValues; index++)
|
||||
{
|
||||
payload[payloadIndex] = doValues[index];
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
}
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendGiveElectronicStatusMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendGiveElectronicStatusMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message to set a DAC on another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param deviceId Identity of targeted bus device
|
||||
* \param channelNr Number of the DAC-channel
|
||||
* \param dacMode Voltage (0) / Ampere (<> 0)
|
||||
* \param davValue New DAC value (voltage: 0-10000mV, ampere: 0-20000uA)
|
||||
*/
|
||||
void bpSendSetDacValue( int handle, UINT8 deviceId, UINT8 channelNr, UINT8 dacMode, UINT16 dacValue )
|
||||
{
|
||||
t_bpmsg_message sendSetDacMessage;
|
||||
UINT8 *payload = (UINT8 *) Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
BP_DEBUG_OUT('a'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Create new message
|
||||
sendSetDacMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendSetDacMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendSetDacMessage.targetId = deviceId;
|
||||
sendSetDacMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendSetDacMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendSetDacMessage.messageId = BPMSG_MSGID_SETDACVALUE;
|
||||
sendSetDacMessage.payloadSize = 4;
|
||||
sendSetDacMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[0] = channelNr;
|
||||
payload[1] = dacMode;
|
||||
bpmsgAdd16bit( &payload[2], dacValue);
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendSetDacMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendSetDacMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message to set the values of all DAC's on another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param deviceId Identity of targeted bus device
|
||||
* \param davValue pointer to array with 4 DAC value, i.e. DAC-value position 0 for Channel 0 etc... (voltage: 0-10000mV, ampere: 0-20000uA)
|
||||
*/
|
||||
void bpSendSetAllDacValues( int handle, UINT8 deviceId, UINT16 *dacValue )
|
||||
{
|
||||
t_bpmsg_message sendSetDacMessage;
|
||||
UINT8 *payload = (UINT8 *) Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
BP_DEBUG_OUT('a'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Create new message
|
||||
sendSetDacMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendSetDacMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendSetDacMessage.targetId = deviceId;
|
||||
sendSetDacMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendSetDacMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendSetDacMessage.messageId = BPMSG_MSGID_SETALLDACVALUES;
|
||||
sendSetDacMessage.payloadSize = 4 * 2;
|
||||
sendSetDacMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
bpmsgAdd16bit( &payload[0], dacValue[0]);
|
||||
bpmsgAdd16bit( &payload[2], dacValue[1]);
|
||||
bpmsgAdd16bit( &payload[4], dacValue[2]);
|
||||
bpmsgAdd16bit( &payload[6], dacValue[3]);
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendSetDacMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendSetDacMessage);
|
||||
}
|
||||
|
||||
|
||||
/** \brief Sends message to set a digital out on another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param bitNr Number of the digital output pin
|
||||
* \param value Low-level (0) or High-level (<> 0)
|
||||
*/
|
||||
void bpSendSetDigitalOutValue( int handle, UINT8 deviceId, UINT8 bitNr, UINT8 value )
|
||||
{
|
||||
t_bpmsg_message sendSetDoMessage;
|
||||
UINT8 *payload = (UINT8 *)Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
BP_DEBUG_OUT('d'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Create new message
|
||||
sendSetDoMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendSetDoMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendSetDoMessage.targetId = deviceId;
|
||||
sendSetDoMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendSetDoMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendSetDoMessage.messageId = BPMSG_MSGID_SETDIGITALOUTVALUE;
|
||||
sendSetDoMessage.payloadSize = 2;
|
||||
sendSetDoMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[0] = bitNr;
|
||||
payload[1] = value;
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendSetDoMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendSetDoMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message to set all digital out ports at once on another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param deviceId The ID of the other bus device
|
||||
* \param bits All bitsNumber of the digital output pin
|
||||
*/
|
||||
void bpSendSetAllDigitalOut( int handle, UINT8 deviceId, UINT8 bits)
|
||||
{
|
||||
t_bpmsg_message sendSetDoMessage;
|
||||
UINT8 *payload = (UINT8 *)Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
BP_DEBUG_OUT('d'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Create new message
|
||||
sendSetDoMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendSetDoMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendSetDoMessage.targetId = deviceId;
|
||||
sendSetDoMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendSetDoMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendSetDoMessage.messageId = BPMSG_MSGID_SETALLDIGITALOUT;
|
||||
sendSetDoMessage.payloadSize = 1;
|
||||
sendSetDoMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[0] = bits;
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendSetDoMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendSetDoMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message to set all outputs (analogue & digital) on another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param deviceId Identity of targeted bus device
|
||||
* \param bits All bitsNumber of the digital output pin
|
||||
* \param davValue pointer to array with 4 DAC value, i.e. DAC-value position 0 for Channel 0 etc... (voltage: 0-10000mV, ampere: 0-20000uA)
|
||||
*/
|
||||
void bpSendSetAllOutput( int handle, UINT8 deviceId, UINT8 bits, UINT16 *dacValue )
|
||||
{
|
||||
t_bpmsg_message sendSetAllOutpuntMessage;
|
||||
UINT8 *payload = (UINT8 *) Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
BP_DEBUG_OUT('a'); BP_DEBUG_OUT('o'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Create new message
|
||||
sendSetAllOutpuntMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendSetAllOutpuntMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendSetAllOutpuntMessage.targetId = deviceId;
|
||||
sendSetAllOutpuntMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendSetAllOutpuntMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendSetAllOutpuntMessage.messageId = BPMSG_MSGID_SETALLDOUTPUT;
|
||||
sendSetAllOutpuntMessage.payloadSize = (4 * 2) + 1;
|
||||
sendSetAllOutpuntMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[0] = bits;
|
||||
bpmsgAdd16bit( &payload[1], dacValue[0]);
|
||||
bpmsgAdd16bit( &payload[3], dacValue[1]);
|
||||
bpmsgAdd16bit( &payload[5], dacValue[2]);
|
||||
bpmsgAdd16bit( &payload[7], dacValue[3]);
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendSetAllOutpuntMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendSetAllOutpuntMessage);
|
||||
}
|
||||
|
||||
|
||||
/** \brief Sends message to call an Remote Procedure Call on an other bus device
|
||||
*
|
||||
* Request to execute a procedure on another device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param deviceId Identity of targeted bus device
|
||||
* \param functionId Identity of the RPC-function
|
||||
* \param nrOfParams Number of parameters for the RPC-function
|
||||
* \param params Pointer to an array of 32-bit integers
|
||||
*/
|
||||
void bpSendCallRpc( int handle, UINT8 deviceId, UINT8 functionId, UINT8 nrOfParams, INT32 *params )
|
||||
{
|
||||
t_bpmsg_message sendCallRpcMessage;
|
||||
UINT8 *payload;
|
||||
UINT8 payloadSize;
|
||||
UINT8 payloadIndex = 0;
|
||||
UINT8 index;
|
||||
|
||||
BP_DEBUG_OUT('c'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Determine payload size
|
||||
payloadSize = 3 * BPMSG_UINT8_SIZE;
|
||||
payloadSize += nrOfParams * BPMSG_UINT32_SIZE;
|
||||
|
||||
payload = (UINT8 *)Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
// Create new message
|
||||
sendCallRpcMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendCallRpcMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendCallRpcMessage.targetId = deviceId;
|
||||
sendCallRpcMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendCallRpcMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendCallRpcMessage.messageId = BPMSG_MSGID_CALLRPC;
|
||||
sendCallRpcMessage.payloadSize = payloadSize;
|
||||
sendCallRpcMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[payloadIndex] = ((t_bp_admin *)handle)->rpcRequestNr;
|
||||
((t_bp_admin *)handle)->rpcRequestNr++;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
|
||||
payload[payloadIndex] = functionId;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
|
||||
payload[payloadIndex] = nrOfParams;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
|
||||
for (index = 0; index < nrOfParams; index++)
|
||||
{
|
||||
bpmsgAdd32bit( payload + payloadIndex, (UINT32)params[index]);
|
||||
payloadIndex += BPMSG_UINT32_SIZE;
|
||||
}
|
||||
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendCallRpcMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendCallRpcMessage);
|
||||
}
|
||||
|
||||
/** \brief Sends message to give result on issued RPC-function
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param nrOfResults Number of results to be send
|
||||
* \param results Pointer to array with results.
|
||||
*/
|
||||
void bpSendRpcResult( int handle, UINT8 deviceId, UINT8 functionId, UINT8 requestNr, UINT8 nrOfResults, INT32 *results )
|
||||
{
|
||||
t_bpmsg_message sendCallRpcResultMessage;
|
||||
UINT8 *payload;
|
||||
UINT8 payloadSize;
|
||||
UINT8 payloadIndex = 0;
|
||||
UINT8 index;
|
||||
|
||||
BP_DEBUG_OUT('r'); BP_DEBUG_OUT('>');
|
||||
|
||||
// Determine payload size
|
||||
payloadSize = 3 * BPMSG_UINT8_SIZE;
|
||||
payloadSize += nrOfResults * BPMSG_UINT32_SIZE;
|
||||
|
||||
payload = (UINT8 *)Memmod_Alloc( bpMessagePool );
|
||||
if (payload == 0) return;
|
||||
|
||||
// Create new message
|
||||
sendCallRpcResultMessage.uniqueStartByte = BPMSG_STARTBYTE;
|
||||
sendCallRpcResultMessage.senderId = ((t_bp_admin *)handle)->deviceId;
|
||||
sendCallRpcResultMessage.targetId = deviceId;
|
||||
sendCallRpcResultMessage.packetNr = 0; // packetNr filled at transmitting time
|
||||
sendCallRpcResultMessage.status = 0; // Clear status (filled by ProtocolThread)
|
||||
sendCallRpcResultMessage.messageId = BPMSG_MSGID_GIVERPCRESULTS;
|
||||
sendCallRpcResultMessage.payloadSize = payloadSize;
|
||||
sendCallRpcResultMessage.payload = payload;
|
||||
|
||||
// Fill Payload
|
||||
payload[payloadIndex] = requestNr;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
|
||||
payload[payloadIndex] = functionId;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
|
||||
payload[payloadIndex] = nrOfResults;
|
||||
payloadIndex += BPMSG_UINT8_SIZE;
|
||||
|
||||
for (index = 0; index < nrOfResults; index++)
|
||||
{
|
||||
bpmsgAdd32bit( &payload[payloadIndex], (UINT32)results[index]);
|
||||
payloadIndex += BPMSG_UINT32_SIZE;
|
||||
}
|
||||
|
||||
// Calculate CRC
|
||||
bpmsgEncodeMessage(&sendCallRpcResultMessage);
|
||||
|
||||
bpthreadAddMessage(((t_bp_admin *)handle)->bpthreadHandle, &sendCallRpcResultMessage);
|
||||
}
|
||||
|
||||
|
||||
/** \brief Attachs a callback, which is called when it is the device its turn to send data on the bus
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param onMyTurnCallback pointer to the callback function
|
||||
*/
|
||||
void bpAttachOnMyTurn( int handle, t_bp_myturn_callback onMyTurnCallback )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
bpthreadAttachMyTurn( bpAdmin->bpthreadHandle, onMyTurnCallback);
|
||||
}
|
||||
|
||||
/** \brief Detaches the above callback
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param onMyTurnCallback pointer to the callback function
|
||||
*/
|
||||
void bpDetachOnMyTurn( int handle, t_bp_myturn_callback onMyTurnCallback )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
bpthreadDetachMyTurn( bpAdmin->bpthreadHandle, onMyTurnCallback);
|
||||
}
|
||||
|
||||
/** \brief Attachs a RPC-function, which can be called by another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param functionId The identity of the RPC-function
|
||||
* \param functionPointer Pointer to actual RPC-function
|
||||
* \param nrOfParams Number of parameters, required by RPC
|
||||
*/
|
||||
void bpAttachRpc( int handle, UINT8 functionId, char * functionName, t_rpc_remote_procedure_call functionPointer, UINT8 nrOfParams )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
rpcAdd( bpAdmin->rpcHandle, functionId, functionName, functionPointer, nrOfParams);
|
||||
}
|
||||
|
||||
/** \brief Detaches the above RPC-function
|
||||
*
|
||||
* \post RPC-function is not supported anymore
|
||||
* \param handle The handle for the BusProtocol (received with bpInit())
|
||||
* \param functionId Identity of the detached RPC-function
|
||||
*/
|
||||
void bpDetachRpc( int handle, UINT8 functionId )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
rpcRemove( bpAdmin->rpcHandle, functionId );
|
||||
}
|
||||
|
||||
/** \brief Attachs a "RPC result"-function, which is a result of a requeste RPC-call on another bus device
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (returned by bpInit())
|
||||
* \param functionId The functionId on which the result should be catched
|
||||
* \param functionPointer The funtion which must be called when a RPC-result is received.
|
||||
*/
|
||||
void bpAttachRpcResult( int handle, UINT8 functionId, t_bp_rpcresult_callback functionPointer, UINT8 nrOfResults )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
rpcrAdd( bpAdmin->rpcrHandle, functionId, functionPointer, nrOfResults);
|
||||
}
|
||||
|
||||
/** \brief Detaches the above "RPC result"-function
|
||||
*
|
||||
* \param handle The handle for the BusProtocol (returned by bpInit())
|
||||
* \param functionId The functionId on which the result should be catched
|
||||
*/
|
||||
void bpDetachRpcResult( int handle, UINT8 functionId )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
rpcrRemove( bpAdmin->rpcrHandle, functionId );
|
||||
}
|
||||
|
||||
|
||||
t_rpc_entity *bpLookupRpcEntry( int handle, UINT8 functionId )
|
||||
{
|
||||
t_bp_admin *bpAdmin = (t_bp_admin *)handle;
|
||||
|
||||
return rpcLookupEntry( bpAdmin->rpcHandle, functionId );
|
||||
}
|
||||
|
||||
void WriteElectricStatusCallback( int handle, BOOLEAN isDigital, UINT8 device, UINT8 channel, UINT16 value )
|
||||
{
|
||||
if (isDigital)
|
||||
{
|
||||
bpSendSetDigitalOutValue( handle, device, channel, (BOOLEAN)value ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpSendSetDacValue( handle, device, channel, 0, value );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* BusProtocol.h - v0.1 (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, Jan 28, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __BUSPROTOCOL_H__
|
||||
#define __BUSPROTOCOL_H__
|
||||
/** \file BusProtocol.h
|
||||
\brief Implementation of BusProtocol
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "BpPort.h"
|
||||
#include "bus.h"
|
||||
#include "RemoteProcedureCalls.h"
|
||||
#include "BpMessageFormat.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define MASTER_DEVICE_ID (1)
|
||||
#define MAX_PAYLOAD_SIZE (50)
|
||||
#define BP_DEBUG_OUT(a) /*printf("%c", a); fflush( stdout );*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef void (*t_bp_myturn_callback)(void);
|
||||
typedef void (*t_bp_rpcresult_callback)( UINT8 requestNr, UINT8 nrOfResults, UINT32 *results );
|
||||
typedef void (*t_bp_messagehandler)(t_bpmsg_message *receivedMessage, int ownHandler );
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** \brief Initialises the BusProtocol */
|
||||
int bpInit( t_bus_devices bus, UINT8 deviceId, UINT8 highestDeviceId, UINT8 inputQueueSize );
|
||||
|
||||
/** \brief Closes the active BusProtocol */
|
||||
void bpDeinit( int handle );
|
||||
|
||||
/** \brief Indicates whether a message a device is received in the last 10 seconds
|
||||
* Only used by the master
|
||||
*/
|
||||
BOOLEAN bpDeviceIsDetected( int handle, UINT8 deviceId );
|
||||
|
||||
/** \brief Sends message to pass turn (Nothing to send) */
|
||||
void bpSendPassTurn( int handle );
|
||||
|
||||
/** \brief Sends message to reset another bus device */
|
||||
void bpSendResetClient( int handle, UINT8 deviceId );
|
||||
|
||||
/** \brief Sends message with all electronic information (DAC's, ADC's and digital I/O) */
|
||||
void bpSendGiveElectronicStatus( int handle,
|
||||
UINT8 nrOfAdcValues,
|
||||
UINT16 *adcValues,
|
||||
UINT8 nrOfDacValues,
|
||||
UINT16 *dacValues,
|
||||
UINT8 nrOfDiValues,
|
||||
UINT8 *diValues,
|
||||
UINT8 nrOfDoValues,
|
||||
UINT8 *doValues
|
||||
);
|
||||
|
||||
/** \brief Sends message to set a DAC on another bus device */
|
||||
void bpSendSetDacValue( int handle, UINT8 deviceId, UINT8 channelNr, UINT8 dacMode, UINT16 dacValue );
|
||||
|
||||
/** \brief Sends message to set the values of all DAC's on another bus device */
|
||||
void bpSendSetAllDacValues( int handle, UINT8 deviceId, UINT16 *dacValue );
|
||||
|
||||
/** \brief Sends message to set a digital out on another bus device */
|
||||
void bpSendSetDigitalOutValue( int handle, UINT8 deviceId, UINT8 bitNr, UINT8 value );
|
||||
|
||||
/** \brief Sends message to set all digital out ports at once on another bus device */
|
||||
void bpSendSetAllDigitalOut( int handle, UINT8 deviceId, UINT8 bits);
|
||||
|
||||
/** \brief Sends message to set all outputs (analogue & digital) on another bus device */
|
||||
void bpSendSetAllOutput( int handle, UINT8 deviceId, UINT8 bits, UINT16 *dacValue);
|
||||
|
||||
/** \brief Sends message to call an Remote Procedure Call on an other bus device */
|
||||
void bpSendCallRpc( int handle, UINT8 deviceId, UINT8 functionId, UINT8 nrOfParams, INT32 *params );
|
||||
|
||||
/** \brief Attachs a callback, which is called when it is the device its turn to send data on the bus */
|
||||
void bpAttachOnMyTurn( int handle, t_bp_myturn_callback onMyTurnCallback );
|
||||
|
||||
/** \brief Detaches the above callback */
|
||||
void bpDetachOnMyTurn( int handle, t_bp_myturn_callback onMyTurnCallback );
|
||||
|
||||
/** \brief Attach callback on receiving a specific message */
|
||||
void bpAttachMessageHandler( int handle, UINT8 messageId, t_bp_messagehandler messageHandler);
|
||||
|
||||
/** \brief Attach callback on receiving a specific message */
|
||||
void bpDetachMessageHandler( int handle, UINT8 messageId, t_bp_messagehandler messageHandler);
|
||||
|
||||
/** \brief Attachs a RPC-function, which can be called by another bus device */
|
||||
void bpAttachRpc( int handle, UINT8 functionId, char * functionName, t_rpc_remote_procedure_call functionPointer, UINT8 nrOfParams );
|
||||
|
||||
/** \brief Detaches the above RPC-function */
|
||||
void bpDetachRpc( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Attachs a "RPC result"-function, which is a result of a requeste RPC-call on another bus device */
|
||||
void bpAttachRpcResult( int handle, UINT8 functionId, t_bp_rpcresult_callback functionPointer, UINT8 nrOfResult );
|
||||
|
||||
/** \brief Detaches the above "RPC result"-function */
|
||||
void bpDetachRpcResult( int handle, UINT8 functionId );
|
||||
|
||||
t_rpc_entity *bpLookupRpcEntry( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Sends message to give result on issued RPC-function */
|
||||
void bpSendRpcResult( int handle, UINT8 deviceId, UINT8 functionId, UINT8 requestNr, UINT8 nrOfResults, INT32 *results );
|
||||
|
||||
#endif /* __BUSPROTOCOL_H__ */
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,123 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Crc.c - v0.1 (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, Jan 31, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "Crc.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
const UINT16 CRC_table[256] =
|
||||
{
|
||||
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
||||
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
||||
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
|
||||
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
|
||||
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
|
||||
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
|
||||
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
|
||||
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
|
||||
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
|
||||
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
|
||||
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
|
||||
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
|
||||
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
|
||||
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
|
||||
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
|
||||
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
|
||||
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
|
||||
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
|
||||
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
|
||||
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
|
||||
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
|
||||
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
|
||||
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
|
||||
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
|
||||
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
|
||||
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
|
||||
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
|
||||
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
|
||||
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
|
||||
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
|
||||
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
|
||||
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Calculate 16 bit CRC
|
||||
*
|
||||
* a function to calculate an serial 16 bit CRC
|
||||
* according to the CCITT V.024 standard
|
||||
* To short down the calculation time of the serial CRC
|
||||
* a hash table is used.
|
||||
* This CRC is a fast (with hash table) and good CRC for
|
||||
* data transfer and integrity test of data storage. It can effectively
|
||||
* can detect errors by data transfer. 16 Bit is good for data blocks from
|
||||
* 0 - 4 KByte with a residual risk for non detection of 10E-8 per transfer.
|
||||
* (Multiply this with the error factor of the transmit line)
|
||||
*
|
||||
* The polynoom of CRC-16-CCIT = x^16 + x^12 + x^5 + 1
|
||||
*
|
||||
* \param data Build the crc from this data block
|
||||
* \param length Length of the data block
|
||||
* \param feed Initial CRC value (take 0 by default)
|
||||
*/
|
||||
UINT16 crcCalc(UINT8 * data, UINT32 length, UINT16 feed)
|
||||
{
|
||||
unsigned short crc = feed;
|
||||
unsigned char index;
|
||||
unsigned int count;
|
||||
|
||||
for(count=0; count<length; count++)
|
||||
{
|
||||
index = (unsigned char)(crc >> 8);
|
||||
crc = crc & 0x00FF;
|
||||
crc = (crc << 8);
|
||||
crc &= 0xFF00;
|
||||
crc = crc ^ CRC_table[index] ^ (*data & 0x00FF);
|
||||
data++;
|
||||
}
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Crc.h - v0.1 (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, Jan 31, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __CRC_H__
|
||||
#define __CRC_H__
|
||||
/** \file Crc.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
UINT16 crcCalc(UINT8 * pData, UINT32 length, UINT16 feed);
|
||||
|
||||
#endif /* __CRC_H__ */
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,270 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* BusProtocol.c - v0.1 (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, Jan 28, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "types.h"
|
||||
#include "ElecStatusCache.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define MAX_NR_DEVICES 20
|
||||
#define CACHE_NOT_USED 0xFF
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static UINT16 *bpecAdcReadCache[MAX_NR_DEVICES];
|
||||
static UINT8 bpecAdcReadCacheSize[MAX_NR_DEVICES];
|
||||
static UINT16 *bpecDacReadBackCache[MAX_NR_DEVICES];
|
||||
static UINT8 bpecDacReadBackCacheSize[MAX_NR_DEVICES];
|
||||
static BOOLEAN *bpecDioReadCache[MAX_NR_DEVICES];
|
||||
static UINT8 bpecDioReadCacheSize[MAX_NR_DEVICES];
|
||||
static BOOLEAN *bpecDioReadBackCache[MAX_NR_DEVICES];
|
||||
static UINT8 bpecDioReadBackCacheSize[MAX_NR_DEVICES];
|
||||
static t_bpec_write_callback bpecWriteCallback;
|
||||
static int bpecBusProtocolHandle;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void bpecInit()
|
||||
{
|
||||
int i;
|
||||
|
||||
bpecWriteCallback = NULL;
|
||||
bpecBusProtocolHandle = -1;
|
||||
|
||||
// Empty the administration
|
||||
for (i = 0; i < MAX_NR_DEVICES; i++)
|
||||
{
|
||||
bpecAdcReadCache[i] = NULL;
|
||||
bpecAdcReadCacheSize[i] = CACHE_NOT_USED;
|
||||
bpecDacReadBackCache[i] = NULL;
|
||||
bpecDacReadBackCacheSize[i] = CACHE_NOT_USED;
|
||||
bpecDioReadCache[i] = NULL;
|
||||
bpecDioReadCacheSize[i] = CACHE_NOT_USED;
|
||||
bpecDioReadBackCache[i] = NULL;
|
||||
bpecDioReadBackCacheSize[i] = CACHE_NOT_USED;
|
||||
}
|
||||
}
|
||||
|
||||
void bpecAttachWriteCallback(int busProtocolHandle, t_bpec_write_callback callback)
|
||||
{
|
||||
bpecBusProtocolHandle = busProtocolHandle;
|
||||
bpecWriteCallback = callback;
|
||||
}
|
||||
|
||||
void bpecDetachWriteCallback()
|
||||
{
|
||||
bpecBusProtocolHandle = -1;
|
||||
bpecWriteCallback = NULL;
|
||||
}
|
||||
|
||||
void bpecWriteDacValue( UINT8 device, UINT8 channel, UINT16 dacValue )
|
||||
{
|
||||
if (bpecWriteCallback != NULL)
|
||||
{
|
||||
bpecWriteCallback( bpecBusProtocolHandle, FALSE, device, channel, dacValue );
|
||||
}
|
||||
}
|
||||
|
||||
void bpecWriteDioValue( UINT8 device, UINT8 channel, BOOLEAN doValue )
|
||||
{
|
||||
if (bpecWriteCallback != NULL)
|
||||
{
|
||||
bpecWriteCallback( bpecBusProtocolHandle, TRUE, device, channel, (UINT16)doValue );
|
||||
}
|
||||
}
|
||||
|
||||
void bpecSetAdcReadCache( UINT8 device, UINT16 adcValues[], UINT8 nrOfAdcValues)
|
||||
{
|
||||
static int NrOfAllocs = 0;
|
||||
if (bpecAdcReadCacheSize[device] != nrOfAdcValues)
|
||||
{
|
||||
if (bpecAdcReadCacheSize[device] == CACHE_NOT_USED)
|
||||
{
|
||||
NrOfAllocs++;
|
||||
bpecAdcReadCache[device] = pvPortMalloc( nrOfAdcValues * sizeof(UINT16) );
|
||||
if (bpecAdcReadCache[device] != NULL)
|
||||
{
|
||||
bpecAdcReadCacheSize[device] = nrOfAdcValues;
|
||||
memcpy(bpecAdcReadCache[device], adcValues, nrOfAdcValues * sizeof(UINT16));
|
||||
} /* else Failure */
|
||||
}
|
||||
/* else Failure */
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(bpecAdcReadCache[device], adcValues, nrOfAdcValues * sizeof(UINT16));
|
||||
}
|
||||
}
|
||||
|
||||
void bpecSetDioReadCache( UINT8 device, BOOLEAN dioValues[], UINT8 nrOfDioValues)
|
||||
{
|
||||
if (bpecDioReadCacheSize[device] != nrOfDioValues)
|
||||
{
|
||||
if (bpecDioReadCacheSize[device] == CACHE_NOT_USED)
|
||||
{
|
||||
bpecDioReadCache[device] = pvPortMalloc( nrOfDioValues * sizeof(BOOLEAN) );
|
||||
if (bpecDioReadCache[device] != NULL)
|
||||
{
|
||||
bpecDioReadCacheSize[device] = nrOfDioValues;
|
||||
memcpy(bpecDioReadCache[device], dioValues, nrOfDioValues * sizeof(BOOLEAN));
|
||||
} /* else Failure */
|
||||
}
|
||||
/* else Failure */
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(bpecDioReadCache[device], dioValues, nrOfDioValues * sizeof(BOOLEAN));
|
||||
}
|
||||
}
|
||||
|
||||
void bpecSetDioReadBackCache( UINT8 device, BOOLEAN dioValues[], UINT8 nrOfDioValues)
|
||||
{
|
||||
static int NrOfWritings = 0;
|
||||
static int LastSetDevice = 0;
|
||||
static int LastSetNrOfDioValues = 0;
|
||||
NrOfWritings++;
|
||||
LastSetDevice = device;
|
||||
LastSetNrOfDioValues = nrOfDioValues;
|
||||
|
||||
if (bpecDioReadBackCacheSize[device] != nrOfDioValues)
|
||||
{
|
||||
if (bpecDioReadBackCacheSize[device] == CACHE_NOT_USED)
|
||||
{
|
||||
bpecDioReadBackCache[device] = pvPortMalloc( nrOfDioValues * sizeof(BOOLEAN) );
|
||||
if (bpecDioReadBackCache[device] != NULL)
|
||||
{
|
||||
bpecDioReadBackCacheSize[device] = nrOfDioValues;
|
||||
memcpy(bpecDioReadBackCache[device], dioValues, nrOfDioValues * sizeof(BOOLEAN));
|
||||
} /* else Failure */
|
||||
}
|
||||
/* else Failure */
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(bpecDioReadBackCache[device], dioValues, nrOfDioValues * sizeof(BOOLEAN));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void bpecSetDacReadBackCache( UINT8 device, UINT16 dacValues[], UINT8 nrOfDacValues)
|
||||
{
|
||||
if (bpecDacReadBackCacheSize[device] != nrOfDacValues)
|
||||
{
|
||||
if (bpecDacReadBackCacheSize[device] == CACHE_NOT_USED)
|
||||
{
|
||||
bpecDacReadBackCache[device] = pvPortMalloc( nrOfDacValues * sizeof(UINT16) );
|
||||
if (bpecDacReadBackCache[device] != NULL)
|
||||
{
|
||||
bpecDacReadBackCacheSize[device] = nrOfDacValues;
|
||||
memcpy(bpecDacReadBackCache[device], dacValues, nrOfDacValues * sizeof(UINT16));
|
||||
} /* else Failure */
|
||||
}
|
||||
/* else Failure */
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(bpecDacReadBackCache[device], dacValues, nrOfDacValues * sizeof(UINT16));
|
||||
}
|
||||
}
|
||||
|
||||
UINT16 bpecAdcRead( UINT8 device, UINT8 channel )
|
||||
{
|
||||
UINT16 result = 0;
|
||||
|
||||
if (bpecAdcReadCacheSize[device] != CACHE_NOT_USED)
|
||||
{
|
||||
if (channel < bpecAdcReadCacheSize[device])
|
||||
{
|
||||
result = (bpecAdcReadCache[device])[channel];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOLEAN bpecDioRead( UINT8 device, UINT8 channel )
|
||||
{
|
||||
BOOLEAN result = FALSE;
|
||||
|
||||
if (bpecDioReadCacheSize[device] != CACHE_NOT_USED)
|
||||
{
|
||||
if (channel < bpecDioReadCacheSize[device])
|
||||
{
|
||||
result = (bpecDioReadCache[device])[channel];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOLEAN bpecDioReadBack( UINT8 device, UINT8 channel )
|
||||
{
|
||||
BOOLEAN result = FALSE;
|
||||
|
||||
if (bpecDioReadBackCacheSize[device] != CACHE_NOT_USED)
|
||||
{
|
||||
if (channel < bpecDioReadBackCacheSize[device])
|
||||
{
|
||||
result = (bpecDioReadBackCache[device])[channel];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
UINT16 bpecDacReadBack( UINT8 device, UINT8 channel )
|
||||
{
|
||||
UINT16 result = 0;
|
||||
|
||||
if (bpecDacReadBackCacheSize[device] != CACHE_NOT_USED)
|
||||
{
|
||||
if (channel < bpecDacReadBackCacheSize[device])
|
||||
{
|
||||
result = (bpecDacReadBackCache[device])[channel];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* ElecStatusCache.h - v0.1 (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: Stores all electronic status of other IO-controllers
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __ELECSTATUSCACHE_H__
|
||||
#define __ELECSTATUSCACHE_H__
|
||||
/** \file ElecStatusCache.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
//#include "BpMessageFormat.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef void (*t_bpec_write_callback)( int handle, BOOLEAN isDigital, UINT8 device, UINT8 channel, UINT16 value );
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void bpecInit();
|
||||
void bpecAttachWriteCallback(int busProtocolHandle, t_bpec_write_callback callback);
|
||||
void bpecDetachWriteCallback();
|
||||
void bpecWriteDacValue( UINT8 device, UINT8 channel, UINT16 dacValue );
|
||||
void bpecWriteDioValue( UINT8 device, UINT8 channel, BOOLEAN doValue );
|
||||
void bpecSetAdcReadCache( UINT8 device, UINT16 adcValues[], UINT8 nrOfAdcValues);
|
||||
void bpecSetDioReadCache( UINT8 device, BOOLEAN dioValues[], UINT8 nrOfDioValues);
|
||||
void bpecSetDioReadBackCache( UINT8 device, BOOLEAN dioValues[], UINT8 nrOfDioValues);
|
||||
void bpecSetDacReadBackCache( UINT8 device, UINT16 dacValues[], UINT8 nrOfDacValues);
|
||||
UINT16 bpecAdcRead( UINT8 device, UINT8 channel );
|
||||
BOOLEAN bpecDioRead( UINT8 device, UINT8 channel );
|
||||
BOOLEAN bpecDioReadBack( UINT8 device, UINT8 channel );
|
||||
UINT16 bpecDacReadBack( UINT8 device, UINT8 channel );
|
||||
|
||||
#endif /* __ELECSTATUSCACHE_H__ */
|
||||
@@ -0,0 +1,237 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,596 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/cregpiodae
|
||||
pkglibdir = $(libdir)/cregpiodae
|
||||
pkgincludedir = $(includedir)/cregpiodae
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
bin_PROGRAMS = testapp$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS depcomp install-sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_testapp_OBJECTS = analogue_test.$(OBJEXT) BpMessageFormat.$(OBJEXT) \
|
||||
BpPort.$(OBJEXT) bus.$(OBJEXT) BusProtocol.$(OBJEXT) \
|
||||
BUS_test.$(OBJEXT) CAN_test.$(OBJEXT) CF_test.$(OBJEXT) \
|
||||
Crc.$(OBJEXT) digital_test.$(OBJEXT) EEPROM_test.$(OBJEXT) \
|
||||
ElecStatusCache.$(OBJEXT) ethernet_test.$(OBJEXT) \
|
||||
LED_test.$(OBJEXT) main.$(OBJEXT) mem_mod.$(OBJEXT) \
|
||||
MessageHandlerQueue.$(OBJEXT) MessageQueue.$(OBJEXT) \
|
||||
protocolfunctions.$(OBJEXT) ProtocolThread.$(OBJEXT) \
|
||||
relay_test.$(OBJEXT) RemoteProcedureCalls.$(OBJEXT) \
|
||||
RpcResults.$(OBJEXT) smc4000io.$(OBJEXT) USB_test.$(OBJEXT)
|
||||
testapp_OBJECTS = $(am_testapp_OBJECTS)
|
||||
testapp_DEPENDENCIES =
|
||||
testapp_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(testapp_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(testapp_SOURCES)
|
||||
DIST_SOURCES = $(testapp_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = ${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run aclocal-1.10
|
||||
AMTAR = ${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run tar
|
||||
AUTOCONF = ${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run automake-1.10
|
||||
AWK = gawk
|
||||
CC = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e
|
||||
CPP = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e
|
||||
CPPFLAGS =
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DPACKAGE_NAME=\"creGpioDae\" -DPACKAGE_TARNAME=\"cregpiodae\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"creGpioDae\ 0.0.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"cregpiodae\" -DVERSION=\"0.0.1\" -D_GNU_SOURCE=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MATH_H=1 -DHAVE_STDIO_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1
|
||||
DEPDIR = .deps
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
GREP = /bin/grep
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LDFLAGS = -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/
|
||||
LIBOBJS =
|
||||
LIBS =
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
OBJEXT = o
|
||||
PACKAGE = cregpiodae
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME = creGpioDae
|
||||
PACKAGE_STRING = creGpioDae 0.0.1
|
||||
PACKAGE_TARNAME = cregpiodae
|
||||
PACKAGE_VERSION = 0.0.1
|
||||
PATH_SEPARATOR = :
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
STRIP = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-strip
|
||||
VERSION = 0.0.1
|
||||
abs_builddir = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1
|
||||
abs_srcdir = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1
|
||||
abs_top_builddir = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1
|
||||
abs_top_srcdir = /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1
|
||||
ac_ct_CC =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build_alias = x86_64-pc-linux-gnu
|
||||
builddir = .
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host_alias = powerpc-linux
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = $(SHELL) /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = /bin/mkdir -p
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
srcdir = .
|
||||
sysconfdir = /etc
|
||||
target_alias = powerpc-linux
|
||||
top_builddir = .
|
||||
top_srcdir = .
|
||||
testapp_SOURCES = \
|
||||
analogue_test.c \
|
||||
BpMessageFormat.c \
|
||||
BpPort.c \
|
||||
bus.c \
|
||||
BusProtocol.c \
|
||||
BUS_test.c \
|
||||
CAN_test.c \
|
||||
CF_test.c \
|
||||
Crc.c \
|
||||
digital_test.c \
|
||||
EEPROM_test.c \
|
||||
ElecStatusCache.c \
|
||||
ethernet_test.c \
|
||||
LED_test.c \
|
||||
main.c \
|
||||
mem_mod.c \
|
||||
MessageHandlerQueue.c \
|
||||
MessageQueue.c \
|
||||
protocolfunctions.c \
|
||||
ProtocolThread.c \
|
||||
relay_test.c \
|
||||
RemoteProcedureCalls.c \
|
||||
RpcResults.c \
|
||||
smc4000io.c \
|
||||
USB_test.c
|
||||
|
||||
testapp_LDFLAGS = -static
|
||||
testapp_LDADD = -L. -lm -lpthread
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
testapp$(EXEEXT): $(testapp_OBJECTS) $(testapp_DEPENDENCIES)
|
||||
@rm -f testapp$(EXEEXT)
|
||||
$(testapp_LINK) $(testapp_OBJECTS) $(testapp_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/BUS_test.Po
|
||||
include ./$(DEPDIR)/BpMessageFormat.Po
|
||||
include ./$(DEPDIR)/BpPort.Po
|
||||
include ./$(DEPDIR)/BusProtocol.Po
|
||||
include ./$(DEPDIR)/CAN_test.Po
|
||||
include ./$(DEPDIR)/CF_test.Po
|
||||
include ./$(DEPDIR)/Crc.Po
|
||||
include ./$(DEPDIR)/EEPROM_test.Po
|
||||
include ./$(DEPDIR)/ElecStatusCache.Po
|
||||
include ./$(DEPDIR)/LED_test.Po
|
||||
include ./$(DEPDIR)/MessageHandlerQueue.Po
|
||||
include ./$(DEPDIR)/MessageQueue.Po
|
||||
include ./$(DEPDIR)/ProtocolThread.Po
|
||||
include ./$(DEPDIR)/RemoteProcedureCalls.Po
|
||||
include ./$(DEPDIR)/RpcResults.Po
|
||||
include ./$(DEPDIR)/USB_test.Po
|
||||
include ./$(DEPDIR)/analogue_test.Po
|
||||
include ./$(DEPDIR)/bus.Po
|
||||
include ./$(DEPDIR)/digital_test.Po
|
||||
include ./$(DEPDIR)/ethernet_test.Po
|
||||
include ./$(DEPDIR)/main.Po
|
||||
include ./$(DEPDIR)/mem_mod.Po
|
||||
include ./$(DEPDIR)/protocolfunctions.Po
|
||||
include ./$(DEPDIR)/relay_test.Po
|
||||
include ./$(DEPDIR)/smc4000io.Po
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
|
||||
distclean distclean-compile distclean-generic distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,34 @@
|
||||
bin_PROGRAMS = testapp
|
||||
testapp_SOURCES = \
|
||||
analogue_test.c \
|
||||
BpMessageFormat.c \
|
||||
BpPort.c \
|
||||
bus.c \
|
||||
BusProtocol.c \
|
||||
BUS_test.c \
|
||||
CAN_test.c \
|
||||
CF_test.c \
|
||||
Crc.c \
|
||||
digital_test.c \
|
||||
EEPROM_test.c \
|
||||
ElecStatusCache.c \
|
||||
ethernet_test.c \
|
||||
LED_test.c \
|
||||
main.c \
|
||||
mem_mod.c \
|
||||
MessageHandlerQueue.c \
|
||||
MessageQueue.c \
|
||||
protocolfunctions.c \
|
||||
ProtocolThread.c \
|
||||
relay_test.c \
|
||||
RemoteProcedureCalls.c \
|
||||
RpcResults.c \
|
||||
smc4000io.c \
|
||||
USB_test.c
|
||||
|
||||
|
||||
testapp_LDFLAGS = -static
|
||||
testapp_LDADD = -L. -lm -lpthread
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,596 @@
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
bin_PROGRAMS = testapp$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS depcomp install-sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_testapp_OBJECTS = analogue_test.$(OBJEXT) BpMessageFormat.$(OBJEXT) \
|
||||
BpPort.$(OBJEXT) bus.$(OBJEXT) BusProtocol.$(OBJEXT) \
|
||||
BUS_test.$(OBJEXT) CAN_test.$(OBJEXT) CF_test.$(OBJEXT) \
|
||||
Crc.$(OBJEXT) digital_test.$(OBJEXT) EEPROM_test.$(OBJEXT) \
|
||||
ElecStatusCache.$(OBJEXT) ethernet_test.$(OBJEXT) \
|
||||
LED_test.$(OBJEXT) main.$(OBJEXT) mem_mod.$(OBJEXT) \
|
||||
MessageHandlerQueue.$(OBJEXT) MessageQueue.$(OBJEXT) \
|
||||
protocolfunctions.$(OBJEXT) ProtocolThread.$(OBJEXT) \
|
||||
relay_test.$(OBJEXT) RemoteProcedureCalls.$(OBJEXT) \
|
||||
RpcResults.$(OBJEXT) smc4000io.$(OBJEXT) USB_test.$(OBJEXT)
|
||||
testapp_OBJECTS = $(am_testapp_OBJECTS)
|
||||
testapp_DEPENDENCIES =
|
||||
testapp_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(testapp_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(testapp_SOURCES)
|
||||
DIST_SOURCES = $(testapp_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
testapp_SOURCES = \
|
||||
analogue_test.c \
|
||||
BpMessageFormat.c \
|
||||
BpPort.c \
|
||||
bus.c \
|
||||
BusProtocol.c \
|
||||
BUS_test.c \
|
||||
CAN_test.c \
|
||||
CF_test.c \
|
||||
Crc.c \
|
||||
digital_test.c \
|
||||
EEPROM_test.c \
|
||||
ElecStatusCache.c \
|
||||
ethernet_test.c \
|
||||
LED_test.c \
|
||||
main.c \
|
||||
mem_mod.c \
|
||||
MessageHandlerQueue.c \
|
||||
MessageQueue.c \
|
||||
protocolfunctions.c \
|
||||
ProtocolThread.c \
|
||||
relay_test.c \
|
||||
RemoteProcedureCalls.c \
|
||||
RpcResults.c \
|
||||
smc4000io.c \
|
||||
USB_test.c
|
||||
|
||||
testapp_LDFLAGS = -static
|
||||
testapp_LDADD = -L. -lm -lpthread
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
testapp$(EXEEXT): $(testapp_OBJECTS) $(testapp_DEPENDENCIES)
|
||||
@rm -f testapp$(EXEEXT)
|
||||
$(testapp_LINK) $(testapp_OBJECTS) $(testapp_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BUS_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BpMessageFormat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BpPort.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BusProtocol.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CAN_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CF_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Crc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EEPROM_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ElecStatusCache.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LED_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageHandlerQueue.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageQueue.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProtocolThread.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RemoteProcedureCalls.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RpcResults.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/USB_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analogue_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digital_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ethernet_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem_mod.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocolfunctions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relay_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smc4000io.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
|
||||
distclean distclean-compile distclean-generic distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,208 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* MessageHandlerQueue.c - v0.1 (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, Jan 30, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <pthread.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "MessageHandlerQueue.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
typedef struct t_mhq_ENTITY
|
||||
{
|
||||
UINT8 messageId;
|
||||
t_bp_messagehandler messageHandler;
|
||||
int ownHandle;
|
||||
struct t_mhq_ENTITY *next;
|
||||
struct t_mhq_ENTITY *previous;
|
||||
} t_mhq_entity;
|
||||
|
||||
typedef struct t_mhq_ADMIN
|
||||
{
|
||||
struct t_mhq_ENTITY *head;
|
||||
struct t_mhq_ENTITY *tail;
|
||||
pthread_mutex_t mutex;
|
||||
} t_mhq_admin;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static t_mhq_entity *lookupMhqEntry(int handle, UINT8 messageId);
|
||||
|
||||
|
||||
int mhqInit()
|
||||
{
|
||||
t_mhq_admin *newAdmin = (t_mhq_admin *)pvPortMalloc( sizeof(t_mhq_admin) );
|
||||
|
||||
newAdmin->head = NULL;
|
||||
|
||||
// initialise Mutex
|
||||
pthread_mutex_init(&(newAdmin->mutex), NULL);
|
||||
|
||||
return (int)newAdmin;
|
||||
}
|
||||
|
||||
void mhqDeinit(int handle)
|
||||
{
|
||||
t_mhq_entity *iterator = ((t_mhq_admin *)handle)->head;
|
||||
|
||||
while (iterator != NULL)
|
||||
{
|
||||
t_mhq_entity *nextItem = iterator->next;
|
||||
vPortFree( iterator );
|
||||
iterator = nextItem;
|
||||
}
|
||||
|
||||
vPortFree( (t_mhq_admin *)handle );
|
||||
}
|
||||
|
||||
void mhqAdd(int handle, UINT8 messageId, t_bp_messagehandler messageHandler, int ownHandle)
|
||||
{
|
||||
t_mhq_admin *theAdmin = (t_mhq_admin *)handle;
|
||||
t_mhq_entity *newEntry = (t_mhq_entity *)pvPortMalloc( sizeof(t_mhq_entity) );
|
||||
|
||||
// fill entry
|
||||
newEntry->messageId = messageId;
|
||||
newEntry->messageHandler = messageHandler;
|
||||
newEntry->ownHandle = ownHandle;
|
||||
newEntry->next = NULL;
|
||||
newEntry->previous = NULL;
|
||||
|
||||
pthread_mutex_lock(&(theAdmin->mutex));
|
||||
{
|
||||
// Add to linked list
|
||||
if (theAdmin->head != NULL)
|
||||
{
|
||||
theAdmin->tail->next = newEntry;
|
||||
newEntry->previous = theAdmin->tail;
|
||||
theAdmin->tail = newEntry;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->head = newEntry;
|
||||
theAdmin->tail = newEntry;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(theAdmin->mutex));
|
||||
}
|
||||
|
||||
void mhqRemove(int handle, UINT8 messageId, t_bp_messagehandler messageHandler)
|
||||
{
|
||||
t_mhq_entity *entry = lookupMhqEntry(handle, messageId);
|
||||
t_mhq_admin *theAdmin = (t_mhq_admin *)handle;
|
||||
|
||||
pthread_mutex_lock(&(theAdmin->mutex));
|
||||
{
|
||||
if (entry != NULL)
|
||||
{
|
||||
// rebuild linked list
|
||||
if (entry->next != NULL)
|
||||
{
|
||||
entry->next->previous = entry->previous;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->tail = entry->previous;
|
||||
}
|
||||
|
||||
if (entry->previous != NULL)
|
||||
{
|
||||
entry->previous->next = entry->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->head = entry->next;
|
||||
}
|
||||
|
||||
// remove entry
|
||||
vPortFree( entry );
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(theAdmin->mutex));
|
||||
}
|
||||
|
||||
RESULT mhqExecute(int handle, UINT8 messageId, t_bpmsg_message *message)
|
||||
{
|
||||
t_mhq_entity *item = lookupMhqEntry(handle, messageId);
|
||||
|
||||
if (item != NULL)
|
||||
{
|
||||
item->messageHandler( message, item->ownHandle );
|
||||
|
||||
return OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
t_mhq_entity *lookupMhqEntry(int handle, UINT8 messageId)
|
||||
{
|
||||
t_mhq_admin *theAdmin = (t_mhq_admin *)handle;
|
||||
t_mhq_entity *result = NULL;
|
||||
t_mhq_entity *iterator;
|
||||
|
||||
pthread_mutex_lock(&(theAdmin->mutex));
|
||||
{
|
||||
iterator = theAdmin->head;
|
||||
while ((result == NULL) && (iterator != NULL))
|
||||
{
|
||||
if (iterator->messageId == messageId)
|
||||
{
|
||||
result = iterator;
|
||||
}
|
||||
else
|
||||
{
|
||||
iterator = iterator->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(theAdmin->mutex));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* MessageHandlerQueue.h - v0.1 (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, Jan 30, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __MESSAGEHANDLERQUEUE_H__
|
||||
#define __MESSAGEHANDLERQUEUE_H__
|
||||
/** \file MessageHandlerQueue.h
|
||||
\brief Contains a list of message handlers
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BusProtocol.h"
|
||||
#include "BpMessageFormat.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int mhqInit();
|
||||
void mhqAdd(int handle, UINT8 messageId, t_bp_messagehandler messageHandler, int ownHandle);
|
||||
void mhqRemove(int handle, UINT8 messageId, t_bp_messagehandler messageHandler);
|
||||
RESULT mhqExecute(int handle, UINT8 messageId, t_bpmsg_message *message);
|
||||
|
||||
|
||||
#endif /* __MESSAGEHANDLERQUEUE_H__ */
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* MessageQueue.c - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "MessageQueue.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
t_mq_messagequeue *mqInit()
|
||||
{
|
||||
t_mq_messagequeue *newMessageQueue = (t_mq_messagequeue *)pvPortMalloc( sizeof(t_mq_messagequeue) );
|
||||
|
||||
newMessageQueue->count = 0;
|
||||
newMessageQueue->head = 0;
|
||||
newMessageQueue->tail = 0;
|
||||
|
||||
// initialise Mutex
|
||||
pthread_mutex_init(&(newMessageQueue->mutex), NULL);
|
||||
|
||||
return newMessageQueue;
|
||||
}
|
||||
|
||||
RESULT mqAdd( t_mq_messagequeue *queue, t_bpmsg_message *message)
|
||||
{
|
||||
RESULT result = OK;
|
||||
|
||||
pthread_mutex_lock(&(queue->mutex));
|
||||
{
|
||||
if(queue->count >= TX_QUEUE_SIZE)
|
||||
{
|
||||
printf("messagequeue full\n"); fflush(stdout);
|
||||
result = ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy( &(queue->messages[queue->tail]), message, sizeof(t_bpmsg_message) );
|
||||
queue->count++;
|
||||
queue->tail = (queue->tail + 1) % TX_QUEUE_SIZE;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(queue->mutex));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
RESULT mqGet( t_mq_messagequeue *queue, t_bpmsg_message *message)
|
||||
{
|
||||
RESULT result = OK;
|
||||
|
||||
pthread_mutex_lock(&(queue->mutex));
|
||||
{
|
||||
if(queue->count > 0)
|
||||
{
|
||||
memcpy( message, &(queue->messages[queue->head]), sizeof(t_bpmsg_message) );
|
||||
queue->head = (queue->head + 1) % TX_QUEUE_SIZE;
|
||||
queue->count--;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ERROR;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(queue->mutex));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOLEAN mqEmpty( t_mq_messagequeue *queue )
|
||||
{
|
||||
UINT8 count;
|
||||
|
||||
pthread_mutex_lock(&(queue->mutex));
|
||||
{
|
||||
count = queue->count;
|
||||
}
|
||||
pthread_mutex_unlock(&(queue->mutex));
|
||||
|
||||
return ( count == 0 ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* MessageQueue.h - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __MESSAGEQUEUE_H__
|
||||
#define __MESSAGEQUEUE_H__
|
||||
/** \file MessageQueue.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <pthread.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpMessageFormat.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define TX_QUEUE_SIZE (20)
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef struct t_mq_MESSAGEQUEUE
|
||||
{
|
||||
t_bpmsg_message messages[TX_QUEUE_SIZE];
|
||||
UINT8 head;
|
||||
UINT8 tail;
|
||||
UINT8 count;
|
||||
pthread_mutex_t mutex;
|
||||
} t_mq_messagequeue;
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
t_mq_messagequeue *mqInit();
|
||||
RESULT mqAdd( t_mq_messagequeue *queue, t_bpmsg_message *message);
|
||||
RESULT mqGet( t_mq_messagequeue *queue, t_bpmsg_message *message);
|
||||
BOOLEAN mqEmpty( t_mq_messagequeue *queue );
|
||||
|
||||
|
||||
#endif /* __MESSAGEQUEUE_H__ */
|
||||
|
||||
@@ -0,0 +1,879 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* ProtocolThread.c - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "BusProtocol.h"
|
||||
#include "ProtocolThread.h"
|
||||
#include "bus.h"
|
||||
#include "MessageQueue.h"
|
||||
#include "MessageHandlerQueue.h"
|
||||
#include "BpMessageFormat.h"
|
||||
#include "Crc.h"
|
||||
#include "ElecStatusCache.h"
|
||||
#include "mem_mod.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define TX_QUEUE_SIZE (20)
|
||||
#define MAX_TX_MESSAGES (12) /**< Maximum number of message to be send in 1 turn */
|
||||
#define THREAD_NAME_BUS1 "Bus1Pb"
|
||||
#define THREAD_NAME_BUS2 "Bus2Pb"
|
||||
#define MESSAGE_THREAD_NAME_BUS1 "Bus1MsgH"
|
||||
#define MESSAGE_THREAD_NAME_BUS2 "Bus2MsgH"
|
||||
#define MAX_NR_CHANNELS (32)
|
||||
#define MSG_QUEUE_NAME "/BpMsgQueue"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
IDLE,
|
||||
SENDER_ID,
|
||||
TARGET_ID,
|
||||
PACKET_NR,
|
||||
STATUS,
|
||||
MESSAGE_ID,
|
||||
PAYLOAD_SIZE,
|
||||
PAYLOAD,
|
||||
CRC
|
||||
} t_bpthread_decodestatus;
|
||||
|
||||
|
||||
typedef struct t_BPTHREAD_ADMIN {
|
||||
t_bus_devices bus;
|
||||
UINT8 deviceId;
|
||||
UINT8 highestDeviceId;
|
||||
int busProtocolHandle;
|
||||
int messageHandlerHandle;
|
||||
t_bp_myturn_callback myTurnCallback;
|
||||
pthread_t threadHandle;
|
||||
pthread_t threadMessageHandle;
|
||||
t_mq_messagequeue *messageQueue;
|
||||
t_mq_messagequeue *messageHandlerQueue;
|
||||
UINT8 lastReceivedPacketNr;
|
||||
UINT8 lastReceivedSenderId;
|
||||
t_bpthread_decodestatus decodeStatus;
|
||||
t_bpmsg_message rxMessage;
|
||||
BOOLEAN rxStartByteDetected;
|
||||
UINT8 rxFillIdx;
|
||||
UINT16 rxCrc;
|
||||
UINT16 cyclusTimeout;
|
||||
UINT32 cyclusEndTick;
|
||||
UINT16 messageTimeout;
|
||||
UINT32 messageEndTick;
|
||||
UINT16 backoffTime;
|
||||
portTickType *timestampLastRecvMsgDevices;
|
||||
} t_bpthread_admin;
|
||||
|
||||
extern memman *bpMessagePool;
|
||||
memman *bpRecvMessagePool;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static void *protocolThread( void *pvParameters );
|
||||
static void *messageHandlerThread( void *pvParameters );
|
||||
static t_bpmsg_message *decodeByte( t_bpthread_admin *threadAdmin, UINT8 byte );
|
||||
static void handleMessage(t_bpthread_admin *threadAdmin, t_bpmsg_message *message);
|
||||
static void detectMyTurn(t_bpthread_admin *threadAdmin, t_bpmsg_message *message);
|
||||
static void doMyTurnActions(t_bpthread_admin *threadAdmin);
|
||||
static void checkTimeouts(t_bpthread_admin *threadAdmin);
|
||||
static void resetMessageTimeout(t_bpthread_admin *threadAdmin);
|
||||
static void resetCyclusTimeout(t_bpthread_admin *threadAdmin);
|
||||
static void sendMessage( t_bus_devices bus, t_bpmsg_message *message );
|
||||
static UINT32 calcEndTick( UINT16 timeoutPeriod );
|
||||
static BOOLEAN hasTimeoutPast( UINT32 endTick );
|
||||
static BOOLEAN ignoreFirstStartByte(t_bpthread_admin *threadAdmin, UINT8 byte);
|
||||
static void putOnLine( t_bus_devices bus, UINT8 dataLength, UINT8 *data);
|
||||
static void DecodeAndCacheElectronicStatus(t_bpmsg_message *message);
|
||||
static void SendLocalElectronicStatus(t_bpthread_admin *threadAdmin);
|
||||
|
||||
static int bpthreadMessageReceived = 0;
|
||||
static int bpthreadMessageSend = 0;
|
||||
static int bpthreadBadCrcMessage = 0;
|
||||
static int bpthreadDecodeError = 0;
|
||||
static UINT16 bpthreadArrayAdcValue[MAX_NR_CHANNELS];
|
||||
static UINT16 bpthreadArrayDacValue[MAX_NR_CHANNELS];
|
||||
static BOOLEAN bpthreadArrayDoValue[MAX_NR_CHANNELS];
|
||||
static BOOLEAN bpthreadArrayDiValue[MAX_NR_CHANNELS];
|
||||
|
||||
/** \brief Starts the protocol handling thread
|
||||
*
|
||||
* \param bus The communicaiton bus
|
||||
* \param deviceId Identifier for this device
|
||||
* \param highestDeviceId The highest deviceId on the bus (only required for master device (deviceId = 0x01))
|
||||
* \param bpHandle Handle of busprotocol
|
||||
* \parma mhqHandle Handle of MessageHandlerQueue
|
||||
*/
|
||||
int bpthreadStart(t_bus_devices bus, UINT8 deviceId, UINT8 highestDeviceId, int bpHandle, int mhqHandle)
|
||||
{
|
||||
t_bpthread_admin *newAdmin = (t_bpthread_admin *)pvPortMalloc( sizeof(t_bpthread_admin) );
|
||||
signed char *threadName;
|
||||
signed char *messageHandlerThreadName;
|
||||
int i;
|
||||
|
||||
/* init administration */
|
||||
newAdmin->bus = bus;
|
||||
newAdmin->deviceId = deviceId;
|
||||
newAdmin->highestDeviceId = highestDeviceId;
|
||||
newAdmin->busProtocolHandle = bpHandle;
|
||||
newAdmin->myTurnCallback = NULL;
|
||||
newAdmin->messageQueue = mqInit();
|
||||
newAdmin->decodeStatus = IDLE;
|
||||
newAdmin->lastReceivedSenderId = 0;
|
||||
newAdmin->lastReceivedPacketNr = 0;
|
||||
newAdmin->rxStartByteDetected = FALSE;
|
||||
newAdmin->rxMessage.payload = NULL;
|
||||
newAdmin->messageHandlerHandle = mhqHandle;
|
||||
newAdmin->messageTimeout = 50; //was 50; /// \todo tune timeouts
|
||||
newAdmin->cyclusTimeout = 500; // was 500;
|
||||
newAdmin->backoffTime = 5; // Was 5
|
||||
newAdmin->messageHandlerQueue = mqInit(); // xQueueCreate( 25, sizeof(t_bpmsg_message));
|
||||
newAdmin->timestampLastRecvMsgDevices = (portTickType *)pvPortMalloc( sizeof(portTickType) * highestDeviceId );
|
||||
|
||||
// Reset buffer
|
||||
for (i =0; i < highestDeviceId; i++)
|
||||
{
|
||||
newAdmin->timestampLastRecvMsgDevices[i] = xTaskGetTickCount();
|
||||
}
|
||||
|
||||
|
||||
bpRecvMessagePool = Memmod_Create(8,64); // Make sure size is dividable by 4
|
||||
|
||||
if (bus == BUS1)
|
||||
{
|
||||
threadName = (signed char *)THREAD_NAME_BUS1;
|
||||
messageHandlerThreadName = (signed char *)MESSAGE_THREAD_NAME_BUS1;
|
||||
}
|
||||
else
|
||||
{
|
||||
threadName = (signed char *)THREAD_NAME_BUS2;
|
||||
messageHandlerThreadName = (signed char *)MESSAGE_THREAD_NAME_BUS2;
|
||||
}
|
||||
|
||||
pthread_create( &(newAdmin->threadHandle), NULL, protocolThread, newAdmin ); // Was: xTaskCreate( protocolThread, threadName, configMINIMAL_STACK_SIZE + 100, newAdmin, tskIDLE_PRIORITY + 3, &(newAdmin->threadHandle) );
|
||||
pthread_create( &(newAdmin->threadMessageHandle), NULL, messageHandlerThread, newAdmin ); // Was: xTaskCreate( messageHandlerThread, messageHandlerThreadName, configMINIMAL_STACK_SIZE + 400, newAdmin, tskIDLE_PRIORITY + 2, &(newAdmin->threadMessageHandle) );
|
||||
|
||||
return (int)newAdmin;
|
||||
}
|
||||
|
||||
/** \brief Stops the protocol handling thread
|
||||
*
|
||||
* \note this function is never tested (reconsider implementation)
|
||||
* \post handle is not valid anymore
|
||||
* \param handle Handle to the protocol thread
|
||||
*/
|
||||
void bpthreadStop( int handle )
|
||||
{
|
||||
// \todo Test
|
||||
//vTaskDelete( ((t_bpthread_admin *)handle)->threadHandle );
|
||||
//vTaskDelete( ((t_bpthread_admin *)handle)->threadMessageHandle );
|
||||
|
||||
vPortFree( (void *)handle );
|
||||
}
|
||||
|
||||
/** \brief Add a message to the tx-queue. Message will be send when its this device its turn */
|
||||
void bpthreadAddMessage( int handle, t_bpmsg_message *message )
|
||||
{
|
||||
t_bpthread_admin *theAdmin = (t_bpthread_admin *)handle;
|
||||
mqAdd( theAdmin->messageQueue, message );
|
||||
}
|
||||
|
||||
/** \brief Indicates whether a message a device is received in the last 10 seconds
|
||||
* Only used by the master
|
||||
*/
|
||||
BOOLEAN bpthreadDeviceIsDetected( int handle, UINT8 deviceId )
|
||||
{
|
||||
t_bpthread_admin *theAdmin = (t_bpthread_admin *)handle;
|
||||
portTickType currentTimeout;
|
||||
BOOLEAN retval;
|
||||
|
||||
// if difference is larger than 10 seconds return FALSE
|
||||
currentTimeout = xTaskGetTickCount() - theAdmin->timestampLastRecvMsgDevices[deviceId - 1];
|
||||
if (currentTimeout < 0)
|
||||
{
|
||||
currentTimeout = LONG_MAX - theAdmin->timestampLastRecvMsgDevices[deviceId] + xTaskGetTickCount();
|
||||
}
|
||||
|
||||
if (currentTimeout > 10000) // Timeout larger than 10 seconds
|
||||
{
|
||||
retval = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = TRUE;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/** \brief Attaches a callback function to MyTurn-event, which notifies when it is this device its turn
|
||||
*
|
||||
* \param handle Handle to the protocol thread
|
||||
* \param callback Pointer to callback-function
|
||||
*/
|
||||
void bpthreadAttachMyTurn( int handle, t_bp_myturn_callback callback)
|
||||
{
|
||||
t_bpthread_admin *theAdmin = (t_bpthread_admin *)handle;
|
||||
|
||||
theAdmin->myTurnCallback = callback;
|
||||
}
|
||||
|
||||
/** \brief Detaches the callback function to MyTurn-event
|
||||
*
|
||||
* \param handle Handle to the protocol thread
|
||||
* \param callback Pointer to callback-function
|
||||
*/
|
||||
void bpthreadDetachMyTurn( int handle, t_bp_myturn_callback callback)
|
||||
{
|
||||
t_bpthread_admin *theAdmin = (t_bpthread_admin *)handle;
|
||||
|
||||
theAdmin->myTurnCallback = NULL;
|
||||
}
|
||||
|
||||
/** \brief The thread which handles the in & output on the bus.
|
||||
*
|
||||
* \param pvParameters Pointer to parameters
|
||||
*/
|
||||
void *protocolThread( void *pvParameters )
|
||||
{
|
||||
t_bpthread_admin *threadAdmin = (t_bpthread_admin *)pvParameters;
|
||||
t_bpmsg_message *rxMessage;
|
||||
UINT8 rxByte;
|
||||
|
||||
if (threadAdmin->deviceId == MASTER_DEVICE_ID)
|
||||
{
|
||||
/* This is the master so start sending messages */
|
||||
doMyTurnActions( threadAdmin );
|
||||
|
||||
resetMessageTimeout( threadAdmin );
|
||||
resetCyclusTimeout( threadAdmin );
|
||||
}
|
||||
else
|
||||
{
|
||||
resetMessageTimeout( threadAdmin );
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// Read all bytes received on bus
|
||||
while (busGet( threadAdmin->bus, &rxByte ) == TRUE)
|
||||
{
|
||||
rxMessage = decodeByte( threadAdmin, rxByte );
|
||||
if (rxMessage != NULL)
|
||||
{
|
||||
bpthreadMessageReceived++;
|
||||
threadAdmin->lastReceivedSenderId = rxMessage->senderId;
|
||||
|
||||
// Complete message is received, handle message
|
||||
handleMessage( threadAdmin, rxMessage);
|
||||
resetMessageTimeout( threadAdmin );
|
||||
if (rxMessage->status == BPMSG_STATUS_FINISHEDSENDING )
|
||||
{
|
||||
detectMyTurn( threadAdmin, rxMessage );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Verify timeouts
|
||||
checkTimeouts( threadAdmin );
|
||||
|
||||
vTaskDelay( 5 ); // 5 milliseconden sleep
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
t_bpmsg_message *decodeByte( t_bpthread_admin *threadAdmin, UINT8 byte )
|
||||
{
|
||||
switch (threadAdmin->decodeStatus)
|
||||
{
|
||||
case(IDLE):
|
||||
if (byte == BPMSG_STARTBYTE)
|
||||
{
|
||||
threadAdmin->decodeStatus = SENDER_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpthreadDecodeError++;
|
||||
}
|
||||
break;
|
||||
case(SENDER_ID):
|
||||
if (byte != BPMSG_STARTBYTE) /* 0xAA is not allowed as SENDER_ID, must be a START BYTE */
|
||||
{
|
||||
threadAdmin->rxMessage.senderId = byte;
|
||||
threadAdmin->decodeStatus = TARGET_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpthreadDecodeError++;
|
||||
}
|
||||
break;
|
||||
case(TARGET_ID):
|
||||
if (byte != BPMSG_STARTBYTE) /* 0xAA is not allowed as SENDER_ID, must be a START BYTE */
|
||||
{
|
||||
threadAdmin->rxMessage.targetId = byte;
|
||||
threadAdmin->decodeStatus = PACKET_NR;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpthreadDecodeError++;
|
||||
threadAdmin->decodeStatus = SENDER_ID;
|
||||
}
|
||||
break;
|
||||
case(PACKET_NR):
|
||||
if (byte != BPMSG_STARTBYTE) /* 0xAA is not allowed as PACKET_NR, must be a START BYTE */
|
||||
{
|
||||
threadAdmin->rxMessage.packetNr = byte;
|
||||
threadAdmin->decodeStatus = STATUS;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpthreadDecodeError++;
|
||||
threadAdmin->decodeStatus = SENDER_ID;
|
||||
}
|
||||
break;
|
||||
case(STATUS):
|
||||
if ( (byte & 0x40) == 0x40) /* bit 6 must be high */
|
||||
{
|
||||
threadAdmin->rxMessage.status = byte;
|
||||
threadAdmin->decodeStatus = MESSAGE_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpthreadDecodeError++;
|
||||
threadAdmin->decodeStatus = IDLE;
|
||||
}
|
||||
break;
|
||||
case(MESSAGE_ID):
|
||||
if (byte != BPMSG_STARTBYTE) /* 0xAA is not allowed as PACKET_NR, must be a START BYTE */
|
||||
{
|
||||
threadAdmin->rxMessage.messageId = byte;
|
||||
threadAdmin->decodeStatus = PAYLOAD_SIZE;
|
||||
threadAdmin->rxStartByteDetected = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpthreadDecodeError++;
|
||||
threadAdmin->decodeStatus = SENDER_ID;
|
||||
}
|
||||
break;
|
||||
case(PAYLOAD_SIZE):
|
||||
if (!ignoreFirstStartByte(threadAdmin, byte ))
|
||||
{
|
||||
threadAdmin->rxCrc = crcCalc(&byte, 1, 0);
|
||||
threadAdmin->rxMessage.payloadSize = byte;
|
||||
if (byte > 0)
|
||||
{
|
||||
threadAdmin->decodeStatus = PAYLOAD;
|
||||
threadAdmin->rxMessage.payload = (UINT8 *)Memmod_Alloc(bpRecvMessagePool);
|
||||
threadAdmin->rxFillIdx = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
threadAdmin->decodeStatus = CRC;
|
||||
threadAdmin->rxMessage.payload = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case(PAYLOAD):
|
||||
if (!ignoreFirstStartByte(threadAdmin, byte ))
|
||||
{
|
||||
threadAdmin->rxCrc = crcCalc(&byte, 1, threadAdmin->rxCrc);
|
||||
threadAdmin->rxMessage.payload[threadAdmin->rxFillIdx] = byte;
|
||||
threadAdmin->rxFillIdx++;
|
||||
}
|
||||
|
||||
if (threadAdmin->rxFillIdx == threadAdmin->rxMessage.payloadSize)
|
||||
{
|
||||
threadAdmin->rxFillIdx = 0;
|
||||
threadAdmin->decodeStatus = CRC;
|
||||
}
|
||||
break;
|
||||
case(CRC):
|
||||
if (!ignoreFirstStartByte(threadAdmin, byte) )
|
||||
{
|
||||
if (threadAdmin->rxFillIdx == 0)
|
||||
{
|
||||
threadAdmin->rxMessage.crc = ((UINT16)byte) << 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
threadAdmin->rxMessage.crc |= (UINT16)byte;
|
||||
}
|
||||
threadAdmin->rxFillIdx++;
|
||||
}
|
||||
|
||||
if (threadAdmin->rxFillIdx == 2)
|
||||
{
|
||||
threadAdmin->rxFillIdx = 0;
|
||||
threadAdmin->decodeStatus = IDLE;
|
||||
|
||||
if (threadAdmin->rxCrc == threadAdmin->rxMessage.crc)
|
||||
{
|
||||
return &(threadAdmin->rxMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (threadAdmin->rxMessage.payload != NULL)
|
||||
{
|
||||
Memmod_Free( bpRecvMessagePool, threadAdmin->rxMessage.payload );
|
||||
threadAdmin->rxMessage.payload = NULL;
|
||||
}
|
||||
|
||||
bpthreadBadCrcMessage++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void handleMessage(t_bpthread_admin *threadAdmin, t_bpmsg_message *message)
|
||||
{
|
||||
// Record packet nr.
|
||||
threadAdmin->lastReceivedPacketNr = message->packetNr;
|
||||
|
||||
// Reset Device detected timeout
|
||||
if ((message->senderId > 0) && (message->senderId <= threadAdmin->highestDeviceId)) // Safety first
|
||||
{
|
||||
threadAdmin->timestampLastRecvMsgDevices[message->senderId - 1] = xTaskGetTickCount();
|
||||
}
|
||||
|
||||
// is message ment for this device
|
||||
if ( (message->targetId == BPMSG_BROADCAST_ID)
|
||||
|| (message->targetId == threadAdmin->deviceId)
|
||||
)
|
||||
{
|
||||
// Add to queue
|
||||
mqAdd( threadAdmin->messageHandlerQueue, message); // Was: xQueueSendToBack( threadAdmin->messageHandlerQueue, message, 100);
|
||||
|
||||
// Make sure the payload isn't freed
|
||||
//message->payload = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Delete message stuff
|
||||
if (message->payload != NULL)
|
||||
{
|
||||
Memmod_Free( bpRecvMessagePool, message->payload );
|
||||
message->payload = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void detectMyTurn(t_bpthread_admin *threadAdmin, t_bpmsg_message *message)
|
||||
{
|
||||
BOOLEAN isMyTurn = FALSE;
|
||||
|
||||
if ((message->status & BPMSG_STATUS_FINISHEDSENDING) == BPMSG_STATUS_FINISHEDSENDING)
|
||||
{
|
||||
if (threadAdmin->deviceId == BPMSG_MASTER_DEVID)
|
||||
{
|
||||
if (message->senderId == threadAdmin->highestDeviceId)
|
||||
{
|
||||
resetCyclusTimeout( threadAdmin );
|
||||
isMyTurn = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (message->senderId + 1) == threadAdmin->deviceId)
|
||||
{
|
||||
isMyTurn = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isMyTurn == TRUE)
|
||||
{
|
||||
doMyTurnActions(threadAdmin);
|
||||
}
|
||||
}
|
||||
|
||||
void checkTimeouts( t_bpthread_admin *threadAdmin )
|
||||
{
|
||||
if (threadAdmin->deviceId == MASTER_DEVICE_ID)
|
||||
{
|
||||
if (hasTimeoutPast( threadAdmin->cyclusEndTick ) == TRUE)
|
||||
{
|
||||
BP_DEBUG_OUT( 't'); BP_DEBUG_OUT( 'c');
|
||||
resetCyclusTimeout( threadAdmin );
|
||||
doMyTurnActions( threadAdmin );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If slave device than check if master is seen in the last 10 seconds
|
||||
if (bpthreadDeviceIsDetected( (int)threadAdmin, MASTER_DEVICE_ID ) == FALSE)
|
||||
{
|
||||
// Put slave in save mode and reset device
|
||||
// secureSlave(); NOTE NOTE : This is not intended for the Webcontroller
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Can safely do test again, cause above actions have reset this
|
||||
// timeout in doMyTurnActions.
|
||||
if (hasTimeoutPast( threadAdmin->messageEndTick ) == TRUE)
|
||||
{
|
||||
resetMessageTimeout( threadAdmin );
|
||||
|
||||
// Test if it is possible my turn
|
||||
if ((threadAdmin->lastReceivedSenderId + 1) == threadAdmin->deviceId)
|
||||
{
|
||||
BP_DEBUG_OUT('t'); BP_DEBUG_OUT('m');
|
||||
doMyTurnActions( threadAdmin );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (threadAdmin->deviceId == MASTER_DEVICE_ID)
|
||||
&& (threadAdmin->lastReceivedSenderId == threadAdmin->highestDeviceId)
|
||||
)
|
||||
{
|
||||
BP_DEBUG_OUT('t'); BP_DEBUG_OUT('m');
|
||||
resetCyclusTimeout( threadAdmin );
|
||||
doMyTurnActions( threadAdmin );
|
||||
}
|
||||
else
|
||||
{
|
||||
threadAdmin->lastReceivedSenderId++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void doMyTurnActions(t_bpthread_admin *threadAdmin)
|
||||
{
|
||||
int nrOfMessagesSend = 0;
|
||||
t_bpmsg_message message;
|
||||
UINT16 multipleTimeout;
|
||||
|
||||
// Backoff for some time
|
||||
vTaskDelay( threadAdmin->backoffTime );
|
||||
|
||||
/* Notify MyTurn-event listeners */
|
||||
if (threadAdmin->myTurnCallback != NULL)
|
||||
{
|
||||
// If MyTurn is handled by application -> then application is responsible for send give electronicStatus
|
||||
threadAdmin->myTurnCallback();
|
||||
}
|
||||
|
||||
if (mqEmpty(threadAdmin->messageQueue) == TRUE)
|
||||
bpSendPassTurn(threadAdmin->busProtocolHandle);
|
||||
|
||||
|
||||
// Send MAX messages on the bus
|
||||
while ( (nrOfMessagesSend < MAX_TX_MESSAGES)
|
||||
&& (mqEmpty(threadAdmin->messageQueue) == FALSE)
|
||||
)
|
||||
{
|
||||
if (mqGet(threadAdmin->messageQueue, &message) != ERROR)
|
||||
{
|
||||
// If last message in a row then set status LAST_MESSAGE
|
||||
if ( (mqEmpty(threadAdmin->messageQueue) == TRUE )
|
||||
|| ((nrOfMessagesSend + 1)>= MAX_TX_MESSAGES)
|
||||
)
|
||||
{
|
||||
message.status = BPMSG_STATUS_FINISHEDSENDING;
|
||||
}
|
||||
else
|
||||
{
|
||||
message.status = BPMSG_STATUS_BUSYSENDING;
|
||||
}
|
||||
|
||||
// Fill packetNr
|
||||
threadAdmin->lastReceivedPacketNr++;
|
||||
if (threadAdmin->lastReceivedPacketNr == BPMSG_STARTBYTE) threadAdmin->lastReceivedPacketNr++; // 0xAA cannot be used as packetNr
|
||||
message.packetNr = threadAdmin->lastReceivedPacketNr;
|
||||
|
||||
sendMessage( threadAdmin->bus, &message );
|
||||
nrOfMessagesSend++;
|
||||
|
||||
// Throw payload away (dynamic part of message)
|
||||
if (message.payload != NULL)
|
||||
{
|
||||
Memmod_Free( bpMessagePool, message.payload );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
threadAdmin->lastReceivedSenderId = threadAdmin->deviceId;
|
||||
|
||||
// Reset message timeout multiple times
|
||||
multipleTimeout = nrOfMessagesSend * threadAdmin->messageTimeout;
|
||||
threadAdmin->messageEndTick = calcEndTick( multipleTimeout );
|
||||
}
|
||||
|
||||
void resetMessageTimeout(t_bpthread_admin *threadAdmin)
|
||||
{
|
||||
threadAdmin->messageEndTick = calcEndTick( threadAdmin->messageTimeout);
|
||||
}
|
||||
|
||||
void resetCyclusTimeout(t_bpthread_admin *threadAdmin)
|
||||
{
|
||||
threadAdmin->cyclusEndTick = calcEndTick( threadAdmin->cyclusTimeout);
|
||||
}
|
||||
|
||||
void sendMessage( t_bus_devices bus, t_bpmsg_message *message )
|
||||
{
|
||||
bpthreadMessageSend++;
|
||||
UINT8 crcByte;
|
||||
|
||||
// Put message on the bus
|
||||
busPut( bus, message->uniqueStartByte);
|
||||
busPut( bus, message->senderId);
|
||||
busPut( bus, message->targetId);
|
||||
busPut( bus, message->packetNr);
|
||||
busPut( bus, message->status);
|
||||
busPut( bus, message->messageId);
|
||||
putOnLine( bus, 1, &(message->payloadSize));
|
||||
putOnLine( bus, message->payloadSize, message->payload );
|
||||
crcByte = (UINT8)(message->crc >> 8);
|
||||
putOnLine( bus, 1, &crcByte);
|
||||
crcByte = (UINT8)message->crc;
|
||||
putOnLine( bus, 1, &crcByte);
|
||||
}
|
||||
|
||||
void putOnLine( t_bus_devices bus, UINT8 dataLength, UINT8 *data)
|
||||
{
|
||||
int index;
|
||||
|
||||
for (index = 0; index < dataLength; index++)
|
||||
{
|
||||
if (data[index] == BPMSG_STARTBYTE)
|
||||
{
|
||||
// Write double AA
|
||||
busPut( bus, BPMSG_STARTBYTE);
|
||||
busPut( bus, BPMSG_STARTBYTE);
|
||||
}
|
||||
else
|
||||
{
|
||||
busPut( bus, data[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 calcEndTick( UINT16 timeoutPeriod )
|
||||
{
|
||||
UINT32 result = xTaskGetTickCount() + timeoutPeriod;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOLEAN hasTimeoutPast( UINT32 endTick )
|
||||
{
|
||||
UINT32 nowTick = xTaskGetTickCount();
|
||||
|
||||
if (nowTick >= endTick)
|
||||
{
|
||||
if ((nowTick - endTick) > 0x0000FFFF)
|
||||
{
|
||||
// the endTick has gone through 0 point, nowTick is at end of range
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// nowTick passed endTick.
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((endTick - nowTick) > 0x0000FFFF)
|
||||
{
|
||||
|
||||
// the endTick was at end of range, nowTick has gone through 0 point
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// nowTick still has to pass endTick
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN ignoreFirstStartByte(t_bpthread_admin *threadAdmin, UINT8 byte)
|
||||
{
|
||||
if (threadAdmin->rxStartByteDetected == FALSE)
|
||||
{
|
||||
if (byte == BPMSG_STARTBYTE)
|
||||
{
|
||||
threadAdmin->rxStartByteDetected = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
threadAdmin->rxStartByteDetected = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (byte == BPMSG_STARTBYTE)
|
||||
{
|
||||
// Correctly received the second StartByte
|
||||
threadAdmin->rxStartByteDetected = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Expected a second StartByte but didn't => ERROR
|
||||
threadAdmin->rxStartByteDetected = TRUE;
|
||||
threadAdmin->decodeStatus = IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
return threadAdmin->rxStartByteDetected;
|
||||
}
|
||||
|
||||
void *messageHandlerThread( void *pvParameters )
|
||||
{
|
||||
t_bpthread_admin *threadAdmin = (t_bpthread_admin *)pvParameters;
|
||||
t_bpmsg_message message;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (mqGet( threadAdmin->messageHandlerQueue, &message) == OK) // Was: if (xQueueReceive(threadAdmin->messageHandlerQueue, &message, 200))
|
||||
{
|
||||
// If "Give Electronic status"-update then store in bpec of driver
|
||||
if (message.messageId == BPMSG_MSGID_GIVEELECTRONICSTATUS)
|
||||
{
|
||||
DecodeAndCacheElectronicStatus( &message );
|
||||
}
|
||||
|
||||
// Lookup message and execute handler
|
||||
mhqExecute( threadAdmin->messageHandlerHandle, message.messageId, &message );
|
||||
|
||||
if (message.payload != NULL)
|
||||
{
|
||||
Memmod_Free( bpRecvMessagePool, message.payload );
|
||||
}
|
||||
}
|
||||
vTaskDelay(5);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DecodeAndCacheElectronicStatus(t_bpmsg_message *message)
|
||||
{
|
||||
UINT8 index;
|
||||
UINT8 arraySize;
|
||||
UINT8 payloadIndex = 0;
|
||||
|
||||
BP_DEBUG_OUT( 'e'); BP_DEBUG_OUT( '<');
|
||||
|
||||
// Decode ADC-values
|
||||
arraySize = message->payload[payloadIndex++];
|
||||
for (index = 0; index < arraySize; index++)
|
||||
{
|
||||
bpthreadArrayAdcValue[index] = bpmsgGet16bit( message->payload, &payloadIndex);
|
||||
}
|
||||
bpecSetAdcReadCache( message->senderId, bpthreadArrayAdcValue, arraySize);
|
||||
|
||||
// Decode DAC-values
|
||||
arraySize = message->payload[payloadIndex++];
|
||||
for (index = 0; index < arraySize; index++)
|
||||
{
|
||||
bpthreadArrayDacValue[index] = bpmsgGet16bit( message->payload, &payloadIndex);
|
||||
}
|
||||
bpecSetDacReadBackCache( message->senderId, bpthreadArrayDacValue, arraySize);
|
||||
|
||||
// Decode DIO input-values
|
||||
arraySize = message->payload[payloadIndex++];
|
||||
for (index = 0; index < arraySize; index++)
|
||||
{
|
||||
bpthreadArrayDiValue[index] = bpmsgGet8bit( message->payload, &payloadIndex);
|
||||
}
|
||||
bpecSetDioReadCache( message->senderId, bpthreadArrayDiValue, arraySize);
|
||||
|
||||
// Decode DIO output-values
|
||||
arraySize = message->payload[payloadIndex++];
|
||||
for (index = 0; index < arraySize; index++)
|
||||
{
|
||||
bpthreadArrayDoValue[index] = bpmsgGet8bit( message->payload, &payloadIndex);
|
||||
}
|
||||
bpecSetDioReadBackCache( message->senderId, bpthreadArrayDoValue, arraySize);
|
||||
}
|
||||
|
||||
void SendLocalElectronicStatus(t_bpthread_admin *threadAdmin)
|
||||
{
|
||||
#ifdef DO_NOT_COMPILE
|
||||
int i;
|
||||
|
||||
BP_DEBUG_OUT( 'e'); BP_DEBUG_OUT( '>');
|
||||
|
||||
// Assemble information
|
||||
for (i = 0; i < maxADC_Channels; i++ )
|
||||
{
|
||||
bpthreadArrayAdcValue[i] = adcRead( 0, i );
|
||||
}
|
||||
|
||||
for (i = 0; i < maxDAC_Channels; i++ )
|
||||
{
|
||||
bpthreadArrayDacValue[i] = dacReadBack( 0, i );
|
||||
}
|
||||
|
||||
for (i = 0; i < maxDI_Channels; i++ )
|
||||
{
|
||||
bpthreadArrayDiValue[i] = dioRead( 0, i );
|
||||
}
|
||||
|
||||
for (i = 0; i < maxDO_Channels; i++ )
|
||||
{
|
||||
bpthreadArrayDoValue[i] = dioReadBack( 0, i );
|
||||
}
|
||||
|
||||
// Send message
|
||||
bpSendGiveElectronicStatus( threadAdmin->busProtocolHandle,
|
||||
maxADC_Channels,
|
||||
bpthreadArrayAdcValue,
|
||||
maxDAC_Channels,
|
||||
bpthreadArrayDacValue,
|
||||
maxDI_Channels,
|
||||
(UINT8 *)bpthreadArrayDiValue,
|
||||
maxDO_Channels,
|
||||
(UINT8 *)bpthreadArrayDoValue
|
||||
);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* ProtocolThread.h - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __PROTOCOLTHREAD_H__
|
||||
#define __PROTOCOLTHREAD_H__
|
||||
/** \file ProtocolThread.h
|
||||
\brief Thread which handles the messaging of the protocol.
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "bus.h"
|
||||
#include "BpMessageFormat.h"
|
||||
#include "BusProtocol.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
/** \brief Starts the protocol handling thread */
|
||||
int bpthreadStart( t_bus_devices bus, UINT8 deviceId, UINT8 highestDeviceId, int bpHandle, int mhqHandle );
|
||||
|
||||
/** \brief Stops the protocol handling thread */
|
||||
void bpthreadStop( int handle );
|
||||
|
||||
/** \brief Indicates whether a message a device is received in the last 10 seconds
|
||||
* Only used by the master
|
||||
*/
|
||||
BOOLEAN bpthreadDeviceIsDetected( int handle, UINT8 deviceId );
|
||||
|
||||
/** \brief Add a message to the tx-queue. Message will be send when its this device its turn */
|
||||
void bpthreadAddMessage( int handle, t_bpmsg_message *message );
|
||||
|
||||
/** \brief Attaches a callback function to MyTurn-event, which notifies when it is this device its turn */
|
||||
void bpthreadAttachMyTurn( int handle, t_bp_myturn_callback callback);
|
||||
|
||||
/** \brief Detaches the callback function to MyTurn-event */
|
||||
void bpthreadDetachMyTurn( int handle, t_bp_myturn_callback callback);
|
||||
|
||||
|
||||
#endif /* __PROTOCOLTHREAD_H__ */
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* RemoteProcedureCalls.c - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "RemoteProcedureCalls.h"
|
||||
#include "BusProtocol.h"
|
||||
#include "mem_mod.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define RPC_DISPATCH_QUEUE_SIZE (10)
|
||||
|
||||
extern memman *bpMessagePool;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** \brief Initialises a Remote Procedure Call administration
|
||||
*
|
||||
* \returns Handle to Remote Procedure Call administration (0 = failure)
|
||||
*/
|
||||
int rpcInit()
|
||||
{
|
||||
t_rpc_admin *newAdmin = (t_rpc_admin *)pvPortMalloc( sizeof(t_rpc_admin) );
|
||||
if (newAdmin != NULL)
|
||||
{
|
||||
newAdmin->firstEntry = NULL;
|
||||
newAdmin->lastEntry = NULL;
|
||||
}
|
||||
|
||||
return (int)newAdmin;
|
||||
}
|
||||
|
||||
/** \brief Deinitialises the Remote Procedure Call administration
|
||||
*
|
||||
* \param handle Handle to RPC-adminstration
|
||||
*/
|
||||
void rpcDeinit( int handle )
|
||||
{
|
||||
t_rpc_admin *theAdmin = (t_rpc_admin *)handle;
|
||||
|
||||
// Remove whole list
|
||||
if (theAdmin->firstEntry != NULL)
|
||||
{
|
||||
t_rpc_entity *entry = theAdmin->firstEntry;
|
||||
|
||||
while (entry != NULL)
|
||||
{
|
||||
t_rpc_entity *nextEntry = entry->next;
|
||||
|
||||
vPortFree( entry );
|
||||
|
||||
entry = nextEntry;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove admin
|
||||
vPortFree( (void *)handle );
|
||||
}
|
||||
|
||||
/** \brief Adds a Remote Procedure Call to the administration
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param functionId Identifier for RPC
|
||||
* \param nrOfParams Nr of parameters required by RPC-function
|
||||
*/
|
||||
void rpcAdd( int handle, UINT8 functionId, char * functionName, t_rpc_remote_procedure_call funcptr, UINT8 nrOfParams )
|
||||
{
|
||||
t_rpc_entity *newEntry = (t_rpc_entity *)pvPortMalloc( sizeof(t_rpc_entity) );
|
||||
t_rpc_admin *theAdmin = (t_rpc_admin *)handle;
|
||||
|
||||
// fill entry
|
||||
newEntry->functionId = functionId;
|
||||
newEntry->functionName = functionName;
|
||||
newEntry->rpcFunction = funcptr;
|
||||
newEntry->nrOfParams = nrOfParams;
|
||||
newEntry->next = NULL;
|
||||
newEntry->previous = NULL;
|
||||
|
||||
// Add to linked list
|
||||
if (theAdmin->firstEntry != NULL)
|
||||
{
|
||||
theAdmin->lastEntry->next = newEntry;
|
||||
newEntry->previous = theAdmin->lastEntry;
|
||||
theAdmin->lastEntry = newEntry;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->firstEntry = newEntry;
|
||||
theAdmin->lastEntry = newEntry;
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Removes a Remote Procedure Call to the administration
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param functionId Identifier for RPC-function
|
||||
*/
|
||||
void rpcRemove( int handle, UINT8 functionId )
|
||||
{
|
||||
t_rpc_entity *entry = rpcLookupEntry(handle, functionId);
|
||||
t_rpc_admin *theAdmin = (t_rpc_admin *)handle;
|
||||
|
||||
if (entry != NULL)
|
||||
{
|
||||
// rebuild linked list
|
||||
if (entry->next != NULL)
|
||||
{
|
||||
entry->next->previous = entry->previous;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->lastEntry = entry->previous;
|
||||
}
|
||||
|
||||
if (entry->previous != NULL)
|
||||
{
|
||||
entry->previous->next = entry->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->firstEntry = entry->next;
|
||||
}
|
||||
|
||||
// remove entry
|
||||
vPortFree( entry );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** \brief Looks up a Remote Procedure Call to the administration
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param functionId Identifier for RPC-function
|
||||
* \retval Pointer to RPC-function (NULL when not found)
|
||||
*/
|
||||
t_rpc_remote_procedure_call rpcLookup( int handle, UINT8 functionId )
|
||||
{
|
||||
t_rpc_remote_procedure_call result = NULL;
|
||||
t_rpc_entity *entry = rpcLookupEntry(handle, functionId);
|
||||
|
||||
if (entry != NULL)
|
||||
{
|
||||
result = entry->rpcFunction;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/** \brief Executes a Remote Procedure Call
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param nrOfParams Nr of parameters in params-array
|
||||
* \param params Pointer to array with all parameters
|
||||
* \retval OK RPC request is send
|
||||
* \retval ERROR Unable to send RPC request
|
||||
*/
|
||||
RESULT rpcExecute( int handle, UINT8 functionId, UINT8 nrOfParams, const UINT32 *params )
|
||||
{
|
||||
t_rpc_entity *entry = rpcLookupEntry(handle, functionId);
|
||||
if (entry != NULL)
|
||||
{
|
||||
// Dispatch function to rpcThread
|
||||
// execute function
|
||||
//result = entry->rpcFunction;
|
||||
return OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
t_rpc_entity *rpcLookupEntry( int handle, UINT8 functionId )
|
||||
{
|
||||
t_rpc_admin *theAdmin = (t_rpc_admin *)handle;
|
||||
t_rpc_entity *result = NULL;
|
||||
t_rpc_entity *iterator;
|
||||
|
||||
iterator = theAdmin->firstEntry;
|
||||
while ((result == NULL) && (iterator != NULL))
|
||||
{
|
||||
if (iterator->functionId == functionId)
|
||||
{
|
||||
result = iterator;
|
||||
}
|
||||
else
|
||||
{
|
||||
iterator = iterator->next;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void rpcRequestHandler(t_bpmsg_message *msg, int ownHandler)
|
||||
{
|
||||
UINT8 index = 0;
|
||||
UINT8 count;
|
||||
UINT8 targetId, senderId, requestNr, functionId, nrOfParams;
|
||||
UINT32 *params;
|
||||
t_rpc_entity *rpcEntry;
|
||||
|
||||
// Decode message
|
||||
targetId = msg->targetId;
|
||||
senderId = msg->senderId;
|
||||
requestNr = bpmsgGet8bit( msg->payload, &index);
|
||||
functionId = bpmsgGet8bit( msg->payload, &index);
|
||||
nrOfParams = bpmsgGet8bit( msg->payload, &index);
|
||||
|
||||
BP_DEBUG_OUT('{');
|
||||
BP_DEBUG_OUT('a' + functionId);
|
||||
|
||||
// Allocate an array for the params
|
||||
if (nrOfParams > 0)
|
||||
{
|
||||
params = (UINT32 *)Memmod_Alloc( bpMessagePool );
|
||||
if (params != NULL)
|
||||
{
|
||||
for (count = 0; count < nrOfParams; count++)
|
||||
{
|
||||
params[count] = bpmsgGet32bit(msg->payload, &index);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// \todo Error handling
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
params = NULL;
|
||||
}
|
||||
|
||||
// Call RPC-function
|
||||
rpcEntry = rpcLookupEntry(ownHandler, functionId);
|
||||
if (rpcEntry != NULL)
|
||||
{
|
||||
BP_DEBUG_OUT('a' + functionId);
|
||||
// execute function
|
||||
rpcEntry->rpcFunction( senderId, targetId, requestNr, functionId, nrOfParams, params );
|
||||
}
|
||||
|
||||
if (params != NULL)
|
||||
{
|
||||
Memmod_Free( bpMessagePool, params );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* RemoteProcedureCalls.h - v0.1 (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: Holds supported Remote Procedure Calls
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __REMOTEPROCEDURECALLS_H__
|
||||
#define __REMOTEPROCEDURECALLS_H__
|
||||
/** \file RemoteProcedureCalls.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpMessageFormat.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef void (*t_rpc_remote_procedure_call)( UINT8 senderId, UINT8 targetId, UINT8 requestNr, UINT8 functionId, UINT8 nrOfParams, UINT32 *params );
|
||||
|
||||
typedef struct t_RPC_ENTITY {
|
||||
UINT8 functionId;
|
||||
char * functionName;
|
||||
UINT8 nrOfParams;
|
||||
t_rpc_remote_procedure_call rpcFunction;
|
||||
struct t_RPC_ENTITY *next;
|
||||
struct t_RPC_ENTITY *previous;
|
||||
} t_rpc_entity;
|
||||
|
||||
typedef struct t_RPC_ADMIN {
|
||||
t_rpc_entity *firstEntry;
|
||||
t_rpc_entity *lastEntry;
|
||||
} t_rpc_admin;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
/** \brief Initialises a Remote Procedure Call administration */
|
||||
int rpcInit();
|
||||
|
||||
/** \brief Deinitialises the Remote Procedure Call administration */
|
||||
void rpcDeinit( int handle );
|
||||
|
||||
/** \brief Adds a Remote Procedure Call to the administration */
|
||||
void rpcAdd( int handle, UINT8 functionId, char * functionName, t_rpc_remote_procedure_call funcptr, UINT8 nrOfParams );
|
||||
|
||||
/** \brief Removes a Remote Procedure Call to the administration */
|
||||
void rpcRemove( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Looks up a Remote Procedure Call to the administration */
|
||||
t_rpc_remote_procedure_call rpcLookup( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Executes a Remote Procedure Call */
|
||||
RESULT rpcExecute( int handle, UINT8 functionId, UINT8 nrOfParams, const UINT32 *params );
|
||||
|
||||
t_rpc_entity *rpcLookupEntry( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Message handler for RPC-requests */
|
||||
void rpcRequestHandler(t_bpmsg_message *msg, int ownHandler);
|
||||
|
||||
#endif /* __REMOTEPROCEDURECALLS_H__ */
|
||||
@@ -0,0 +1,285 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* RemoteProcedureCalls.c - v0.1 (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, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
#include "RpcResults.h"
|
||||
#include "BusProtocol.h"
|
||||
#include "mem_mod.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define RPCR_DISPATCH_QUEUE_SIZE (10)
|
||||
|
||||
typedef struct t_RPCR_ENTITY {
|
||||
UINT8 functionId;
|
||||
UINT8 nrOfParams;
|
||||
t_bp_rpcresult_callback rpcrFunction;
|
||||
struct t_RPCR_ENTITY *next;
|
||||
struct t_RPCR_ENTITY *previous;
|
||||
} t_rpcr_entity;
|
||||
|
||||
typedef struct t_RPCR_ADMIN {
|
||||
t_rpcr_entity *firstEntry;
|
||||
t_rpcr_entity *lastEntry;
|
||||
} t_rpcr_admin;
|
||||
|
||||
extern memman *bpMessagePool;
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static t_rpcr_entity *lookupRpcrEntry( int handle, UINT8 functionId );
|
||||
|
||||
|
||||
/** \brief Initialises a Remote Procedure Call administration
|
||||
*
|
||||
* \returns Handle to Remote Procedure Call administration (0 = failure)
|
||||
*/
|
||||
int rpcrInit()
|
||||
{
|
||||
t_rpcr_admin *newAdmin = (t_rpcr_admin *)pvPortMalloc( sizeof(t_rpcr_admin) );
|
||||
if (newAdmin != NULL)
|
||||
{
|
||||
newAdmin->firstEntry = NULL;
|
||||
newAdmin->lastEntry = NULL;
|
||||
}
|
||||
|
||||
return (int)newAdmin;
|
||||
}
|
||||
|
||||
/** \brief Deinitialises the Remote Procedure Call administration
|
||||
*
|
||||
* \param handle Handle to RPC-adminstration
|
||||
*/
|
||||
void rpcrDeinit( int handle )
|
||||
{
|
||||
t_rpcr_admin *theAdmin = (t_rpcr_admin *)handle;
|
||||
|
||||
// Remove whole list
|
||||
if (theAdmin->firstEntry != NULL)
|
||||
{
|
||||
t_rpcr_entity *entry = theAdmin->firstEntry;
|
||||
|
||||
while (entry != NULL)
|
||||
{
|
||||
t_rpcr_entity *nextEntry = entry->next;
|
||||
|
||||
vPortFree( entry );
|
||||
|
||||
entry = nextEntry;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove admin
|
||||
vPortFree( (void *)handle );
|
||||
}
|
||||
|
||||
/** \brief Adds a Remote Procedure Call to the administration
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param functionId Identifier for RPC
|
||||
* \param nrOfParams Nr of parameters required by RPC-function
|
||||
*/
|
||||
void rpcrAdd( int handle, UINT8 functionId, t_bp_rpcresult_callback funcptr, UINT8 nrOfParams )
|
||||
{
|
||||
t_rpcr_entity *newEntry = (t_rpcr_entity *)pvPortMalloc( sizeof(t_rpcr_entity) );
|
||||
t_rpcr_admin *theAdmin = (t_rpcr_admin *)handle;
|
||||
|
||||
// fill entry
|
||||
newEntry->functionId = functionId;
|
||||
newEntry->rpcrFunction = funcptr;
|
||||
newEntry->nrOfParams = nrOfParams;
|
||||
newEntry->next = NULL;
|
||||
newEntry->previous = NULL;
|
||||
|
||||
// Add to linked list
|
||||
if (theAdmin->firstEntry != NULL)
|
||||
{
|
||||
theAdmin->lastEntry->next = newEntry;
|
||||
newEntry->previous = theAdmin->lastEntry;
|
||||
theAdmin->lastEntry = newEntry;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->firstEntry = newEntry;
|
||||
theAdmin->lastEntry = newEntry;
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Removes a Remote Procedure Call to the administration
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param functionId Identifier for RPC-function
|
||||
*/
|
||||
void rpcrRemove( int handle, UINT8 functionId )
|
||||
{
|
||||
t_rpcr_entity *entry = lookupRpcrEntry(handle, functionId);
|
||||
t_rpcr_admin *theAdmin = (t_rpcr_admin *)handle;
|
||||
|
||||
if (entry != NULL)
|
||||
{
|
||||
// rebuild linked list
|
||||
if (entry->next != NULL)
|
||||
{
|
||||
entry->next->previous = entry->previous;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->lastEntry = entry->previous;
|
||||
}
|
||||
|
||||
if (entry->previous != NULL)
|
||||
{
|
||||
entry->previous->next = entry->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
theAdmin->firstEntry = entry->next;
|
||||
}
|
||||
|
||||
// remove entry
|
||||
vPortFree( entry );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** \brief Looks up a Remote Procedure Call to the administration
|
||||
*
|
||||
* \param handle Handle to RPC-administration
|
||||
* \param functionId Identifier for RPC-function
|
||||
* \retval Pointer to RPC-function (NULL when not found)
|
||||
*/
|
||||
t_bp_rpcresult_callback rpcrLookup( int handle, UINT8 functionId )
|
||||
{
|
||||
t_bp_rpcresult_callback result = NULL;
|
||||
t_rpcr_entity *entry = lookupRpcrEntry(handle, functionId);
|
||||
|
||||
if (entry != NULL)
|
||||
{
|
||||
result = entry->rpcrFunction;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
t_rpcr_entity *lookupRpcrEntry( int handle, UINT8 functionId )
|
||||
{
|
||||
t_rpcr_admin *theAdmin = (t_rpcr_admin *)handle;
|
||||
t_rpcr_entity *result = NULL;
|
||||
t_rpcr_entity *iterator;
|
||||
|
||||
iterator = theAdmin->firstEntry;
|
||||
while ((result == NULL) && (iterator != NULL))
|
||||
{
|
||||
if (iterator->functionId == functionId)
|
||||
{
|
||||
result = iterator;
|
||||
}
|
||||
else
|
||||
{
|
||||
iterator = iterator->next;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void rpcrRequestHandler(t_bpmsg_message *msg, int ownHandler)
|
||||
{
|
||||
UINT8 index = 0;
|
||||
UINT8 count;
|
||||
UINT8 targetId, senderId, requestNr, functionId, nrOfResults;
|
||||
UINT32 *results;
|
||||
t_rpcr_entity *rpcrEntry;
|
||||
|
||||
BP_DEBUG_OUT( '!');
|
||||
|
||||
// Decode message
|
||||
targetId = msg->targetId;
|
||||
senderId = msg->senderId;
|
||||
requestNr = bpmsgGet8bit( msg->payload, &index);
|
||||
functionId = bpmsgGet8bit( msg->payload, &index);
|
||||
nrOfResults = bpmsgGet8bit( msg->payload, &index);
|
||||
|
||||
// Allocate an array for the params
|
||||
if (nrOfResults > 0)
|
||||
{
|
||||
results = (UINT32 *)Memmod_Alloc( bpMessagePool );
|
||||
if (results != NULL)
|
||||
{
|
||||
for (count = 0; count < nrOfResults; count++)
|
||||
{
|
||||
results[count] = bpmsgGet32bit(msg->payload, &index);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// \todo Error handling
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
results = NULL;
|
||||
}
|
||||
|
||||
// Call RPC-function
|
||||
rpcrEntry = lookupRpcrEntry(ownHandler, functionId);
|
||||
if (rpcrEntry != NULL)
|
||||
{
|
||||
// execute function
|
||||
BP_DEBUG_OUT('#');
|
||||
rpcrEntry->rpcrFunction( requestNr, nrOfResults, results );
|
||||
}
|
||||
|
||||
if (results != NULL)
|
||||
{
|
||||
Memmod_Free( bpMessagePool, results );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* RpcResults.h - v0.1 (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: Holds supported Remote Procedure Calls
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Jan 29, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __RPCRESULTS_H__
|
||||
#define __RPCRESULTS_H__
|
||||
/** \file RpcResults.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BusProtocol.h"
|
||||
#include "BpMessageFormat.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
/** \brief Initialises a Remote Procedure Call-Result administration */
|
||||
int rpcrInit();
|
||||
|
||||
/** \brief Deinitialises the Remote Procedure Call-Result administration */
|
||||
void rpcrDeinit( int handle );
|
||||
|
||||
/** \brief Adds a RPC-result handler to the administration */
|
||||
void rpcrAdd( int handle, UINT8 functionId, t_bp_rpcresult_callback funcptr, UINT8 nrOfParams);
|
||||
|
||||
/** \brief Removes a RPC-result handler to the administration */
|
||||
void rpcrRemove( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Looks up a RPC-result handler to the administration */
|
||||
t_bp_rpcresult_callback rpcrLookup( int handle, UINT8 functionId );
|
||||
|
||||
/** \brief Message handler for RPC-requests */
|
||||
void rpcrRequestHandler(t_bpmsg_message *msg, int ownHandler);
|
||||
|
||||
#endif /* __RPCRESULTS_H__ */
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,868 @@
|
||||
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(AC_AUTOCONF_VERSION, [2.61],,
|
||||
[m4_warning([this file was generated for autoconf 2.61.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.10'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.10.1], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.10.1])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 13
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES(OBJC)],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for `mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,175 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* bus.c - v0.1 (c) 2007 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: RS-485 bus driver
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, 28-11-2007, fvds.
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "bus.h"
|
||||
#include "protocolfunctions.h"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define BAUDRATE B38400
|
||||
#define BUS1_DEVICE "/dev/ttyPSC1"
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int sigio_interrupt = 0;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
void busInit (t_bus_devices device)
|
||||
{
|
||||
struct termios newtio;
|
||||
|
||||
|
||||
bus1Handle = -1;
|
||||
bus2Handle = -1;
|
||||
|
||||
if (device == BUS1)
|
||||
{
|
||||
bus1Handle = open(BUS1_DEVICE, (O_RDWR | O_NOCTTY | O_NONBLOCK));
|
||||
if (bus1Handle == -1)
|
||||
{
|
||||
printf ("Failed to initialise bus interface\n");
|
||||
}
|
||||
//bus1Handle = open(BUS1_DEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
|
||||
if (bus1Handle < 0)
|
||||
{
|
||||
perror(BUS1_DEVICE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (bus1Handle > 0)
|
||||
{
|
||||
bzero(&newtio, sizeof(newtio));
|
||||
|
||||
newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
|
||||
newtio.c_iflag = IGNPAR;
|
||||
newtio.c_oflag = 0;
|
||||
|
||||
/* set input mode (non-canonical, no echo,...) */
|
||||
newtio.c_lflag = 0;
|
||||
|
||||
newtio.c_cc[VTIME] = 0; /* inter-character timer unused */
|
||||
newtio.c_cc[VMIN] = 5; /* blocking read until 5 chars received */
|
||||
|
||||
|
||||
tcflush(bus1Handle, TCIFLUSH);
|
||||
tcsetattr(bus1Handle,TCSANOW,&newtio);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Write data of a certain length to a serial port.*/
|
||||
void busWrite (
|
||||
t_bus_devices device,
|
||||
UINT16 length, /**< Lengh of data in bytes */
|
||||
UINT8 *data /**< Pointer to data */
|
||||
)
|
||||
{
|
||||
int handle = (device == BUS1 ? bus1Handle: bus2Handle);
|
||||
|
||||
write(handle, data, length);
|
||||
}
|
||||
|
||||
/** \brief Reads data from serial port.
|
||||
\retval Length of received data in bytes*/
|
||||
UINT16 busRead (
|
||||
t_bus_devices device,
|
||||
UINT8 * data /**< Pointer to data */
|
||||
)
|
||||
{
|
||||
int handle = (device == BUS1 ? bus1Handle: bus2Handle);
|
||||
|
||||
return read(handle, data, 255);
|
||||
}
|
||||
|
||||
/** \brief Get byte from serial port.
|
||||
\retval bool Returns true if there was data */
|
||||
BOOLEAN busGet(
|
||||
t_bus_devices device,
|
||||
UINT8 * byte /**< Pointer to byte to return data*/
|
||||
)
|
||||
{
|
||||
int handle = (device == BUS1 ? bus1Handle: bus2Handle);
|
||||
|
||||
return read(handle, byte, 1);
|
||||
}
|
||||
|
||||
/** \brief Send byte to serial port. */
|
||||
void busPut(
|
||||
t_bus_devices device,
|
||||
UINT8 value /**< Byte to send*/
|
||||
)
|
||||
{
|
||||
int handle = (device == BUS1 ? bus1Handle: bus2Handle);
|
||||
|
||||
write(handle, &value, 1);
|
||||
}
|
||||
|
||||
/** \brief Flush serial port buffers. */
|
||||
void busFlush(
|
||||
t_bus_devices device
|
||||
)
|
||||
{
|
||||
int handle = (device == BUS1 ? bus1Handle: bus2Handle);
|
||||
|
||||
tcflush(handle, TCIOFLUSH); // Flushes both input as output
|
||||
}
|
||||
|
||||
/** \brief Check if receive buffers is empty.
|
||||
\retval bool Returns true if recieve buffer is empty */
|
||||
BOOLEAN busEmpty(
|
||||
t_bus_devices device
|
||||
)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* bus.h - v0.1 (c) 2007 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: RS485 interface.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, 10-09-2007, Marcel Mulder.
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __BUS_H__
|
||||
#define __BUS_H__
|
||||
|
||||
/** \file bus.h
|
||||
\brief RS485 (UART) interface.
|
||||
*/
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "BpPort.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
BUS1, /**< First RS485 port*/
|
||||
BUS2 /**< Second RS485 port*/
|
||||
} t_bus_devices;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
int bus1Handle;
|
||||
int bus2Handle;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
/** \brief Initialize of serial bus interface.*/
|
||||
void busInit (
|
||||
t_bus_devices device
|
||||
);
|
||||
|
||||
/** \brief Write data of a certain length to a serial bus.*/
|
||||
void busWrite (
|
||||
t_bus_devices device,
|
||||
UINT16 length, /**< Lengh of data in bytes */
|
||||
UINT8 * data /**< Pointer to data */
|
||||
);
|
||||
|
||||
/** \brief Reads data from serial bus.
|
||||
\retval Lengt of received data in bytes*/
|
||||
UINT16 busRead (
|
||||
t_bus_devices device,
|
||||
UINT8 * data /**< Pointer to data */
|
||||
);
|
||||
|
||||
/** \brief Get byte from serial bus.
|
||||
\retval bool Returns true if there was data */
|
||||
BOOLEAN busGet(
|
||||
t_bus_devices device,
|
||||
UINT8 * byte /**< Pointer to byte to return data*/
|
||||
);
|
||||
|
||||
/** \brief Send byte to serial bus. */
|
||||
void busPut(
|
||||
t_bus_devices device,
|
||||
UINT8 value /**< Byte to send*/
|
||||
);
|
||||
|
||||
/** \brief Flush serial bus buffers. */
|
||||
void busFlush(
|
||||
t_bus_devices device
|
||||
);
|
||||
|
||||
/** \brief Check if receive buffers is empty.
|
||||
\retval bool Returns true if recieve buffer is empty
|
||||
*/
|
||||
BOOLEAN busEmpty(
|
||||
t_bus_devices device
|
||||
);
|
||||
|
||||
#endif /* __BUS_H__ */
|
||||
@@ -0,0 +1,827 @@
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by creGpioDae configure 0.0.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ ./configure --target=powerpc-linux --host=powerpc-linux --build=x86_64-pc-linux-gnu --prefix=/usr --sysconfdir=/etc --disable-nls --disable-largefile
|
||||
|
||||
## --------- ##
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = marvin
|
||||
uname -m = x86_64
|
||||
uname -r = 2.6.27-9-server
|
||||
uname -s = Linux
|
||||
uname -v = #1 SMP Thu Nov 20 22:56:07 UTC 2008
|
||||
|
||||
/usr/bin/uname -p = unknown
|
||||
/bin/uname -X = unknown
|
||||
|
||||
/bin/arch = unknown
|
||||
/usr/bin/arch -k = unknown
|
||||
/usr/convex/getsysinfo = unknown
|
||||
/usr/bin/hostinfo = unknown
|
||||
/bin/machine = unknown
|
||||
/usr/bin/oslevel = unknown
|
||||
/bin/universe = unknown
|
||||
|
||||
PATH: /home/microkey/mmi/Projects/QUA_2475/buildroot/toolchain_build_powerpc/bin
|
||||
PATH: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/bin
|
||||
PATH: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin
|
||||
PATH: /home/microkey/mmi/usr/local/arm/arm-2007q3/bin
|
||||
PATH: /usr/local/sbin
|
||||
PATH: /usr/local/bin
|
||||
PATH: /usr/sbin
|
||||
PATH: /usr/bin
|
||||
PATH: /sbin
|
||||
PATH: /bin
|
||||
PATH: /usr/games
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Core tests. ##
|
||||
## ----------- ##
|
||||
|
||||
configure:1773: checking for a BSD-compatible install
|
||||
configure:1829: result: /usr/bin/install -c
|
||||
configure:1840: checking whether build environment is sane
|
||||
configure:1883: result: yes
|
||||
configure:1911: checking for a thread-safe mkdir -p
|
||||
configure:1950: result: /bin/mkdir -p
|
||||
configure:1963: checking for gawk
|
||||
configure:1979: found /usr/bin/gawk
|
||||
configure:1990: result: gawk
|
||||
configure:2001: checking whether make sets $(MAKE)
|
||||
configure:2022: result: yes
|
||||
configure:2102: checking for powerpc-linux-strip
|
||||
configure:2129: result: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-strip
|
||||
configure:2228: checking for powerpc-linux-gcc
|
||||
configure:2255: result: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e
|
||||
configure:2533: checking for C compiler version
|
||||
configure:2540: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e --version >&5
|
||||
powerpc-linux-uclibc-gcc (GCC) 4.2.4
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:2543: $? = 0
|
||||
configure:2550: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -v >&5
|
||||
Using built-in specs.
|
||||
Target: powerpc-linux-uclibc
|
||||
Configured with: /home/microkey/mmi/Projects/QUA_2475/buildroot/toolchain_build_powerpc/gcc-4.2.4/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=powerpc-linux-uclibc --enable-languages=c --with-sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir --with-build-time-tools=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/powerpc-linux-uclibc/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared --with-gmp=/home/microkey/mmi/Projects/QUA_2475/buildroot/toolchain_build_powerpc/gmp --with-mpfr=/home/microkey/mmi/Projects/QUA_2475/buildroot/toolchain_build_powerpc/mpfr --disable-nls --enable-threads --disable-multilib --with-tune=603e --disable-largefile
|
||||
Thread model: posix
|
||||
gcc version 4.2.4
|
||||
configure:2553: $? = 0
|
||||
configure:2560: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -V >&5
|
||||
powerpc-linux-uclibc-gcc: '-V' must come at the start of the command line
|
||||
configure:2563: $? = 1
|
||||
configure:2586: checking for C compiler default output file name
|
||||
configure:2613: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ conftest.c >&5
|
||||
configure:2616: $? = 0
|
||||
configure:2654: result: a.out
|
||||
configure:2671: checking whether the C compiler works
|
||||
configure:2701: result: yes
|
||||
configure:2708: checking whether we are cross compiling
|
||||
configure:2710: result: yes
|
||||
configure:2713: checking for suffix of executables
|
||||
configure:2720: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -o conftest -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ conftest.c >&5
|
||||
configure:2723: $? = 0
|
||||
configure:2747: result:
|
||||
configure:2753: checking for suffix of object files
|
||||
configure:2779: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:2782: $? = 0
|
||||
configure:2805: result: o
|
||||
configure:2809: checking whether we are using the GNU C compiler
|
||||
configure:2838: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:2844: $? = 0
|
||||
configure:2861: result: yes
|
||||
configure:2866: checking whether /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e accepts -g
|
||||
configure:2896: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -g conftest.c >&5
|
||||
configure:2902: $? = 0
|
||||
configure:3001: result: yes
|
||||
configure:3018: checking for /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e option to accept ISO C89
|
||||
configure:3092: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:3098: $? = 0
|
||||
configure:3121: result: none needed
|
||||
configure:3150: checking for style of include used by make
|
||||
configure:3178: result: GNU
|
||||
configure:3203: checking dependency style of /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e
|
||||
configure:3294: result: gcc3
|
||||
configure:3322: checking for a BSD-compatible install
|
||||
configure:3378: result: /usr/bin/install -c
|
||||
configure:3400: checking for dirent.h that defines DIR
|
||||
configure:3429: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:3435: $? = 0
|
||||
configure:3451: result: yes
|
||||
configure:3464: checking for library containing opendir
|
||||
configure:3505: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -o conftest -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ conftest.c >&5
|
||||
configure:3511: $? = 0
|
||||
configure:3539: result: none required
|
||||
configure:3638: checking how to run the C preprocessor
|
||||
configure:3754: result: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e
|
||||
configure:3783: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
configure:3789: $? = 0
|
||||
configure:3820: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
conftest.c:12:28: error: ac_nonexistent.h: No such file or directory
|
||||
configure:3826: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:3864: checking for grep that handles long lines and -e
|
||||
configure:3938: result: /bin/grep
|
||||
configure:3943: checking for egrep
|
||||
configure:4021: result: /bin/grep -E
|
||||
configure:4026: checking for ANSI C header files
|
||||
configure:4056: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4062: $? = 0
|
||||
configure:4190: result: yes
|
||||
configure:4214: checking for sys/types.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for sys/stat.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for stdlib.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for string.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for memory.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for strings.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for inttypes.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for stdint.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4214: checking for unistd.h
|
||||
configure:4235: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4241: $? = 0
|
||||
configure:4257: result: yes
|
||||
configure:4285: checking parser.h usability
|
||||
configure:4302: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
conftest.c:55:20: error: parser.h: No such file or directory
|
||||
configure:4308: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <stdio.h>
|
||||
| #ifdef HAVE_SYS_TYPES_H
|
||||
| # include <sys/types.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_SYS_STAT_H
|
||||
| # include <sys/stat.h>
|
||||
| #endif
|
||||
| #ifdef STDC_HEADERS
|
||||
| # include <stdlib.h>
|
||||
| # include <stddef.h>
|
||||
| #else
|
||||
| # ifdef HAVE_STDLIB_H
|
||||
| # include <stdlib.h>
|
||||
| # endif
|
||||
| #endif
|
||||
| #ifdef HAVE_STRING_H
|
||||
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
| # include <memory.h>
|
||||
| # endif
|
||||
| # include <string.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STRINGS_H
|
||||
| # include <strings.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_INTTYPES_H
|
||||
| # include <inttypes.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STDINT_H
|
||||
| # include <stdint.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_UNISTD_H
|
||||
| # include <unistd.h>
|
||||
| #endif
|
||||
| #include <parser.h>
|
||||
configure:4322: result: no
|
||||
configure:4326: checking parser.h presence
|
||||
configure:4341: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
conftest.c:22:20: error: parser.h: No such file or directory
|
||||
configure:4347: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <parser.h>
|
||||
configure:4361: result: no
|
||||
configure:4389: checking for parser.h
|
||||
configure:4397: result: no
|
||||
configure:4285: checking iniparser.h usability
|
||||
configure:4302: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
conftest.c:55:23: error: iniparser.h: No such file or directory
|
||||
configure:4308: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <stdio.h>
|
||||
| #ifdef HAVE_SYS_TYPES_H
|
||||
| # include <sys/types.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_SYS_STAT_H
|
||||
| # include <sys/stat.h>
|
||||
| #endif
|
||||
| #ifdef STDC_HEADERS
|
||||
| # include <stdlib.h>
|
||||
| # include <stddef.h>
|
||||
| #else
|
||||
| # ifdef HAVE_STDLIB_H
|
||||
| # include <stdlib.h>
|
||||
| # endif
|
||||
| #endif
|
||||
| #ifdef HAVE_STRING_H
|
||||
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
| # include <memory.h>
|
||||
| # endif
|
||||
| # include <string.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STRINGS_H
|
||||
| # include <strings.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_INTTYPES_H
|
||||
| # include <inttypes.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STDINT_H
|
||||
| # include <stdint.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_UNISTD_H
|
||||
| # include <unistd.h>
|
||||
| #endif
|
||||
| #include <iniparser.h>
|
||||
configure:4322: result: no
|
||||
configure:4326: checking iniparser.h presence
|
||||
configure:4341: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
conftest.c:22:23: error: iniparser.h: No such file or directory
|
||||
configure:4347: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <iniparser.h>
|
||||
configure:4361: result: no
|
||||
configure:4389: checking for iniparser.h
|
||||
configure:4397: result: no
|
||||
configure:4426: checking dictionary.h usability
|
||||
configure:4443: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
conftest.c:55:24: error: dictionary.h: No such file or directory
|
||||
configure:4449: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <stdio.h>
|
||||
| #ifdef HAVE_SYS_TYPES_H
|
||||
| # include <sys/types.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_SYS_STAT_H
|
||||
| # include <sys/stat.h>
|
||||
| #endif
|
||||
| #ifdef STDC_HEADERS
|
||||
| # include <stdlib.h>
|
||||
| # include <stddef.h>
|
||||
| #else
|
||||
| # ifdef HAVE_STDLIB_H
|
||||
| # include <stdlib.h>
|
||||
| # endif
|
||||
| #endif
|
||||
| #ifdef HAVE_STRING_H
|
||||
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
| # include <memory.h>
|
||||
| # endif
|
||||
| # include <string.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STRINGS_H
|
||||
| # include <strings.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_INTTYPES_H
|
||||
| # include <inttypes.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STDINT_H
|
||||
| # include <stdint.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_UNISTD_H
|
||||
| # include <unistd.h>
|
||||
| #endif
|
||||
| #include <dictionary.h>
|
||||
configure:4463: result: no
|
||||
configure:4467: checking dictionary.h presence
|
||||
configure:4482: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
conftest.c:22:24: error: dictionary.h: No such file or directory
|
||||
configure:4488: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <dictionary.h>
|
||||
configure:4502: result: no
|
||||
configure:4530: checking for dictionary.h
|
||||
configure:4538: result: no
|
||||
configure:4426: checking inistrings.h usability
|
||||
configure:4443: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
conftest.c:55:24: error: inistrings.h: No such file or directory
|
||||
configure:4449: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <stdio.h>
|
||||
| #ifdef HAVE_SYS_TYPES_H
|
||||
| # include <sys/types.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_SYS_STAT_H
|
||||
| # include <sys/stat.h>
|
||||
| #endif
|
||||
| #ifdef STDC_HEADERS
|
||||
| # include <stdlib.h>
|
||||
| # include <stddef.h>
|
||||
| #else
|
||||
| # ifdef HAVE_STDLIB_H
|
||||
| # include <stdlib.h>
|
||||
| # endif
|
||||
| #endif
|
||||
| #ifdef HAVE_STRING_H
|
||||
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
| # include <memory.h>
|
||||
| # endif
|
||||
| # include <string.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STRINGS_H
|
||||
| # include <strings.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_INTTYPES_H
|
||||
| # include <inttypes.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_STDINT_H
|
||||
| # include <stdint.h>
|
||||
| #endif
|
||||
| #ifdef HAVE_UNISTD_H
|
||||
| # include <unistd.h>
|
||||
| #endif
|
||||
| #include <inistrings.h>
|
||||
configure:4463: result: no
|
||||
configure:4467: checking inistrings.h presence
|
||||
configure:4482: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
conftest.c:22:24: error: inistrings.h: No such file or directory
|
||||
configure:4488: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h. */
|
||||
| #define PACKAGE_NAME "creGpioDae"
|
||||
| #define PACKAGE_TARNAME "cregpiodae"
|
||||
| #define PACKAGE_VERSION "0.0.1"
|
||||
| #define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE "cregpiodae"
|
||||
| #define VERSION "0.0.1"
|
||||
| #define _GNU_SOURCE 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <inistrings.h>
|
||||
configure:4502: result: no
|
||||
configure:4530: checking for inistrings.h
|
||||
configure:4538: result: no
|
||||
configure:4567: checking math.h usability
|
||||
configure:4584: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4590: $? = 0
|
||||
configure:4604: result: yes
|
||||
configure:4608: checking math.h presence
|
||||
configure:4623: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
configure:4629: $? = 0
|
||||
configure:4643: result: yes
|
||||
configure:4671: checking for math.h
|
||||
configure:4679: result: yes
|
||||
configure:4567: checking stdio.h usability
|
||||
configure:4584: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4590: $? = 0
|
||||
configure:4604: result: yes
|
||||
configure:4608: checking stdio.h presence
|
||||
configure:4623: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
configure:4629: $? = 0
|
||||
configure:4643: result: yes
|
||||
configure:4671: checking for stdio.h
|
||||
configure:4679: result: yes
|
||||
configure:4716: checking fcntl.h usability
|
||||
configure:4733: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4739: $? = 0
|
||||
configure:4753: result: yes
|
||||
configure:4757: checking fcntl.h presence
|
||||
configure:4772: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
configure:4778: $? = 0
|
||||
configure:4792: result: yes
|
||||
configure:4820: checking for fcntl.h
|
||||
configure:4828: result: yes
|
||||
configure:4706: checking for inttypes.h
|
||||
configure:4712: result: yes
|
||||
configure:4716: checking limits.h usability
|
||||
configure:4733: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4739: $? = 0
|
||||
configure:4753: result: yes
|
||||
configure:4757: checking limits.h presence
|
||||
configure:4772: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
configure:4778: $? = 0
|
||||
configure:4792: result: yes
|
||||
configure:4820: checking for limits.h
|
||||
configure:4828: result: yes
|
||||
configure:4706: checking for memory.h
|
||||
configure:4712: result: yes
|
||||
configure:4716: checking stddef.h usability
|
||||
configure:4733: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4739: $? = 0
|
||||
configure:4753: result: yes
|
||||
configure:4757: checking stddef.h presence
|
||||
configure:4772: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c
|
||||
configure:4778: $? = 0
|
||||
configure:4792: result: yes
|
||||
configure:4820: checking for stddef.h
|
||||
configure:4828: result: yes
|
||||
configure:4706: checking for stdint.h
|
||||
configure:4712: result: yes
|
||||
configure:4706: checking for stdlib.h
|
||||
configure:4712: result: yes
|
||||
configure:4706: checking for string.h
|
||||
configure:4712: result: yes
|
||||
configure:4706: checking for strings.h
|
||||
configure:4712: result: yes
|
||||
configure:4706: checking for unistd.h
|
||||
configure:4712: result: yes
|
||||
configure:4844: checking for an ANSI C-conforming const
|
||||
configure:4919: /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e -c -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e conftest.c >&5
|
||||
configure:4925: $? = 0
|
||||
configure:4940: result: yes
|
||||
configure:5107: creating ./config.status
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by creGpioDae config.status 0.0.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
CONFIG_HEADERS =
|
||||
CONFIG_LINKS =
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on marvin
|
||||
|
||||
config.status:5808: creating Makefile
|
||||
config.status:6005: executing depfiles commands
|
||||
|
||||
## ---------------- ##
|
||||
## Cache variables. ##
|
||||
## ---------------- ##
|
||||
|
||||
ac_cv_c_bigendian='yes'
|
||||
ac_cv_c_compiler_gnu='yes'
|
||||
ac_cv_c_const='yes'
|
||||
ac_cv_env_CC_set='set'
|
||||
ac_cv_env_CC_value='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
ac_cv_env_CFLAGS_set='set'
|
||||
ac_cv_env_CFLAGS_value='-Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
ac_cv_env_CPPFLAGS_set=''
|
||||
ac_cv_env_CPPFLAGS_value=''
|
||||
ac_cv_env_CPP_set='set'
|
||||
ac_cv_env_CPP_value='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
ac_cv_env_LDFLAGS_set='set'
|
||||
ac_cv_env_LDFLAGS_value='-L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/'
|
||||
ac_cv_env_LIBS_set=''
|
||||
ac_cv_env_LIBS_value=''
|
||||
ac_cv_env_build_alias_set='set'
|
||||
ac_cv_env_build_alias_value='x86_64-pc-linux-gnu'
|
||||
ac_cv_env_host_alias_set='set'
|
||||
ac_cv_env_host_alias_value='powerpc-linux'
|
||||
ac_cv_env_target_alias_set='set'
|
||||
ac_cv_env_target_alias_value='powerpc-linux'
|
||||
ac_cv_func_calloc_0_nonnull='yes'
|
||||
ac_cv_func_malloc_0_nonnull='yes'
|
||||
ac_cv_func_memcmp_working='yes'
|
||||
ac_cv_func_mmap_fixed_mapped='yes'
|
||||
ac_cv_func_realloc_0_nonnull='yes'
|
||||
ac_cv_have_decl_malloc='yes'
|
||||
ac_cv_header_dictionary_h='no'
|
||||
ac_cv_header_dirent_dirent_h='yes'
|
||||
ac_cv_header_fcntl_h='yes'
|
||||
ac_cv_header_iniparser_h='no'
|
||||
ac_cv_header_inistrings_h='no'
|
||||
ac_cv_header_inttypes_h='yes'
|
||||
ac_cv_header_limits_h='yes'
|
||||
ac_cv_header_math_h='yes'
|
||||
ac_cv_header_memory_h='yes'
|
||||
ac_cv_header_parser_h='no'
|
||||
ac_cv_header_stdc='yes'
|
||||
ac_cv_header_stddef_h='yes'
|
||||
ac_cv_header_stdint_h='yes'
|
||||
ac_cv_header_stdio_h='yes'
|
||||
ac_cv_header_stdlib_h='yes'
|
||||
ac_cv_header_string_h='yes'
|
||||
ac_cv_header_strings_h='yes'
|
||||
ac_cv_header_sys_stat_h='yes'
|
||||
ac_cv_header_sys_types_h='yes'
|
||||
ac_cv_header_unistd_h='yes'
|
||||
ac_cv_lbl_unaligned_fail='yes'
|
||||
ac_cv_objext='o'
|
||||
ac_cv_path_EGREP='/bin/grep -E'
|
||||
ac_cv_path_GREP='/bin/grep'
|
||||
ac_cv_path_install='/usr/bin/install -c'
|
||||
ac_cv_path_mkdir='/bin/mkdir'
|
||||
ac_cv_prog_AWK='gawk'
|
||||
ac_cv_prog_CC='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
ac_cv_prog_CPP='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
ac_cv_prog_STRIP='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-strip'
|
||||
ac_cv_prog_cc_c89=''
|
||||
ac_cv_prog_cc_g='yes'
|
||||
ac_cv_prog_make_make_set='yes'
|
||||
ac_cv_search_opendir='none required'
|
||||
am_cv_CC_dependencies_compiler_type='gcc3'
|
||||
gl_cv_func_malloc_0_nonnull='yes'
|
||||
|
||||
## ----------------- ##
|
||||
## Output variables. ##
|
||||
## ----------------- ##
|
||||
|
||||
ACLOCAL='${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run aclocal-1.10'
|
||||
AMDEPBACKSLASH='\'
|
||||
AMDEP_FALSE='#'
|
||||
AMDEP_TRUE=''
|
||||
AMTAR='${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run tar'
|
||||
AUTOCONF='${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run autoconf'
|
||||
AUTOHEADER='${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run autoheader'
|
||||
AUTOMAKE='${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run automake-1.10'
|
||||
AWK='gawk'
|
||||
CC='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
CCDEPMODE='depmode=gcc3'
|
||||
CFLAGS='-Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
CPP='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'
|
||||
CPPFLAGS=''
|
||||
CYGPATH_W='echo'
|
||||
DEFS='-DPACKAGE_NAME=\"creGpioDae\" -DPACKAGE_TARNAME=\"cregpiodae\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"creGpioDae\ 0.0.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"cregpiodae\" -DVERSION=\"0.0.1\" -D_GNU_SOURCE=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MATH_H=1 -DHAVE_STDIO_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1'
|
||||
DEPDIR='.deps'
|
||||
ECHO_C=''
|
||||
ECHO_N='-n'
|
||||
ECHO_T=''
|
||||
EGREP='/bin/grep -E'
|
||||
EXEEXT=''
|
||||
GREP='/bin/grep'
|
||||
INSTALL_DATA='${INSTALL} -m 644'
|
||||
INSTALL_PROGRAM='${INSTALL}'
|
||||
INSTALL_SCRIPT='${INSTALL}'
|
||||
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
|
||||
LDFLAGS='-L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/'
|
||||
LIBOBJS=''
|
||||
LIBS=''
|
||||
LTLIBOBJS=''
|
||||
MAKEINFO='${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run makeinfo'
|
||||
OBJEXT='o'
|
||||
PACKAGE='cregpiodae'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_NAME='creGpioDae'
|
||||
PACKAGE_STRING='creGpioDae 0.0.1'
|
||||
PACKAGE_TARNAME='cregpiodae'
|
||||
PACKAGE_VERSION='0.0.1'
|
||||
PATH_SEPARATOR=':'
|
||||
SET_MAKE=''
|
||||
SHELL='/bin/bash'
|
||||
STRIP='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-strip'
|
||||
VERSION='0.0.1'
|
||||
ac_ct_CC=''
|
||||
am__fastdepCC_FALSE='#'
|
||||
am__fastdepCC_TRUE=''
|
||||
am__include='include'
|
||||
am__isrc=''
|
||||
am__leading_dot='.'
|
||||
am__quote=''
|
||||
am__tar='${AMTAR} chof - "$$tardir"'
|
||||
am__untar='${AMTAR} xf -'
|
||||
bindir='${exec_prefix}/bin'
|
||||
build_alias='x86_64-pc-linux-gnu'
|
||||
datadir='${datarootdir}'
|
||||
datarootdir='${prefix}/share'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
dvidir='${docdir}'
|
||||
exec_prefix='${prefix}'
|
||||
host_alias='powerpc-linux'
|
||||
htmldir='${docdir}'
|
||||
includedir='${prefix}/include'
|
||||
infodir='${datarootdir}/info'
|
||||
install_sh='$(SHELL) /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/install-sh'
|
||||
libdir='${exec_prefix}/lib'
|
||||
libexecdir='${exec_prefix}/libexec'
|
||||
localedir='${datarootdir}/locale'
|
||||
localstatedir='${prefix}/var'
|
||||
mandir='${datarootdir}/man'
|
||||
mkdir_p='/bin/mkdir -p'
|
||||
oldincludedir='/usr/include'
|
||||
pdfdir='${docdir}'
|
||||
prefix='/usr'
|
||||
program_transform_name='s,x,x,'
|
||||
psdir='${docdir}'
|
||||
sbindir='${exec_prefix}/sbin'
|
||||
sharedstatedir='${prefix}/com'
|
||||
sysconfdir='/etc'
|
||||
target_alias='powerpc-linux'
|
||||
|
||||
## ----------- ##
|
||||
## confdefs.h. ##
|
||||
## ----------- ##
|
||||
|
||||
#define PACKAGE_NAME "creGpioDae"
|
||||
#define PACKAGE_TARNAME "cregpiodae"
|
||||
#define PACKAGE_VERSION "0.0.1"
|
||||
#define PACKAGE_STRING "creGpioDae 0.0.1"
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
#define PACKAGE "cregpiodae"
|
||||
#define VERSION "0.0.1"
|
||||
#define _GNU_SOURCE 1
|
||||
#define HAVE_DIRENT_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
configure: exit 0
|
||||
@@ -0,0 +1,945 @@
|
||||
#! /bin/bash
|
||||
# Generated by configure.
|
||||
# Run this file to recreate the current configuration.
|
||||
# Compiler output produced by configure, useful for debugging
|
||||
# configure, is in config.log if it exists.
|
||||
|
||||
debug=false
|
||||
ac_cs_recheck=false
|
||||
ac_cs_silent=false
|
||||
SHELL=${CONFIG_SHELL-/bin/bash}
|
||||
## --------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
## --------------------- ##
|
||||
|
||||
# Be more Bourne compatible
|
||||
DUALCASE=1; export DUALCASE # for MKS sh
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
|
||||
# is contrary to our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
setopt NO_GLOB_SUBST
|
||||
else
|
||||
case `(set -o) 2>/dev/null` in
|
||||
*posix*) set -o posix ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# PATH needs CR
|
||||
# Avoid depending upon Character Ranges.
|
||||
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
|
||||
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
|
||||
as_cr_digits='0123456789'
|
||||
as_cr_alnum=$as_cr_Letters$as_cr_digits
|
||||
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
|
||||
# Support unset when possible.
|
||||
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
|
||||
as_unset=unset
|
||||
else
|
||||
as_unset=false
|
||||
fi
|
||||
|
||||
|
||||
# IFS
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent editors from complaining about space-tab.
|
||||
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
|
||||
# splitting by setting IFS to empty value.)
|
||||
as_nl='
|
||||
'
|
||||
IFS=" "" $as_nl"
|
||||
|
||||
# Find who we are. Look in the path if we contain no directory separator.
|
||||
case $0 in
|
||||
*[\\/]* ) as_myself=$0 ;;
|
||||
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
esac
|
||||
# We did not find ourselves, most probably we were run as `sh COMMAND'
|
||||
# in which case we are not to be found in the path.
|
||||
if test "x$as_myself" = x; then
|
||||
as_myself=$0
|
||||
fi
|
||||
if test ! -f "$as_myself"; then
|
||||
echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
|
||||
{ (exit 1); exit 1; }
|
||||
fi
|
||||
|
||||
# Work around bugs in pre-3.0 UWIN ksh.
|
||||
for as_var in ENV MAIL MAILPATH
|
||||
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
|
||||
done
|
||||
PS1='$ '
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
|
||||
# NLS nuisances.
|
||||
for as_var in \
|
||||
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
|
||||
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
|
||||
LC_TELEPHONE LC_TIME
|
||||
do
|
||||
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
|
||||
eval $as_var=C; export $as_var
|
||||
else
|
||||
($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
|
||||
fi
|
||||
done
|
||||
|
||||
# Required to use basename.
|
||||
if expr a : '\(a\)' >/dev/null 2>&1 &&
|
||||
test "X`expr 00001 : '.*\(...\)'`" = X001; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
|
||||
as_basename=basename
|
||||
else
|
||||
as_basename=false
|
||||
fi
|
||||
|
||||
|
||||
# Name of the executable.
|
||||
as_me=`$as_basename -- "$0" ||
|
||||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
|
||||
X"$0" : 'X\(//\)$' \| \
|
||||
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X/"$0" |
|
||||
sed '/^.*\/\([^/][^/]*\)\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\/\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\/\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'`
|
||||
|
||||
# CDPATH.
|
||||
$as_unset CDPATH
|
||||
|
||||
|
||||
|
||||
as_lineno_1=5269
|
||||
as_lineno_2=5270
|
||||
test "x$as_lineno_1" != "x$as_lineno_2" &&
|
||||
test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
|
||||
|
||||
# Create $as_me.lineno as a copy of $as_myself, but with 5274
|
||||
# uniformly replaced by the line number. The first 'sed' inserts a
|
||||
# line-number line after each line using 5276; the second 'sed'
|
||||
# does the real work. The second script uses 'N' to pair each
|
||||
# line-number line with the line containing 5278, and appends
|
||||
# trailing '-' during substitution so that 5279 is not a special
|
||||
# case at line end.
|
||||
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
|
||||
# scripts with optimization help from Paolo Bonzini. Blame Lee
|
||||
# E. McMahon (1931-1989) for sed's syntax. :-)
|
||||
sed -n '
|
||||
p
|
||||
/[$]LINENO/=
|
||||
' <$as_myself |
|
||||
sed '
|
||||
s/[$]LINENO.*/&-/
|
||||
t lineno
|
||||
b
|
||||
:lineno
|
||||
N
|
||||
:loop
|
||||
s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
|
||||
t loop
|
||||
s/-\n.*//
|
||||
' >$as_me.lineno &&
|
||||
chmod +x "$as_me.lineno" ||
|
||||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
# Don't try to exec as it changes $[0], causing all sort of problems
|
||||
# (the dirname of $[0] is not the place where we might find the
|
||||
# original and so on. Autoconf is especially sensitive to this).
|
||||
. "./$as_me.lineno"
|
||||
# Exit status is that of the last command.
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
|
||||
as_dirname=dirname
|
||||
else
|
||||
as_dirname=false
|
||||
fi
|
||||
|
||||
ECHO_C= ECHO_N= ECHO_T=
|
||||
case `echo -n x` in
|
||||
-n*)
|
||||
case `echo 'x\c'` in
|
||||
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
|
||||
*) ECHO_C='\c';;
|
||||
esac;;
|
||||
*)
|
||||
ECHO_N='-n';;
|
||||
esac
|
||||
|
||||
if expr a : '\(a\)' >/dev/null 2>&1 &&
|
||||
test "X`expr 00001 : '.*\(...\)'`" = X001; then
|
||||
as_expr=expr
|
||||
else
|
||||
as_expr=false
|
||||
fi
|
||||
|
||||
rm -f conf$$ conf$$.exe conf$$.file
|
||||
if test -d conf$$.dir; then
|
||||
rm -f conf$$.dir/conf$$.file
|
||||
else
|
||||
rm -f conf$$.dir
|
||||
mkdir conf$$.dir
|
||||
fi
|
||||
echo >conf$$.file
|
||||
if ln -s conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s='ln -s'
|
||||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
|
||||
if mkdir -p . 2>/dev/null; then
|
||||
as_mkdir_p=:
|
||||
else
|
||||
test -d ./-p && rmdir ./-p
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
|
||||
# Sed expression to map a string onto a valid variable name.
|
||||
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
|
||||
|
||||
|
||||
exec 6>&1
|
||||
|
||||
# Save the log message, to keep $[0] and so on meaningful, and to
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by creGpioDae $as_me 0.0.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
CONFIG_LINKS = $CONFIG_LINKS
|
||||
CONFIG_COMMANDS = $CONFIG_COMMANDS
|
||||
$ $0 $@
|
||||
|
||||
on `(hostname || uname -n) 2>/dev/null | sed 1q`
|
||||
"
|
||||
|
||||
# Files that config.status was made for.
|
||||
config_files=" Makefile"
|
||||
config_commands=" depfiles"
|
||||
|
||||
ac_cs_usage="\
|
||||
\`$as_me' instantiates files from templates according to the
|
||||
current configuration.
|
||||
|
||||
Usage: $0 [OPTIONS] [FILE]...
|
||||
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number and configuration settings, then exit
|
||||
-q, --quiet do not print progress messages
|
||||
-d, --debug don't remove temporary files
|
||||
--recheck update $as_me by reconfiguring in the same conditions
|
||||
--file=FILE[:TEMPLATE]
|
||||
instantiate the configuration file FILE
|
||||
|
||||
Configuration files:
|
||||
$config_files
|
||||
|
||||
Configuration commands:
|
||||
$config_commands
|
||||
|
||||
Report bugs to <bug-autoconf@gnu.org>."
|
||||
|
||||
ac_cs_version="\
|
||||
creGpioDae config.status 0.0.1
|
||||
configured by ./configure, generated by GNU Autoconf 2.61,
|
||||
with options \"'--target=powerpc-linux' '--host=powerpc-linux' '--build=x86_64-pc-linux-gnu' '--prefix=/usr' '--sysconfdir=/etc' '--disable-nls' '--disable-largefile' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=powerpc-linux' 'target_alias=powerpc-linux' 'CC=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' 'CFLAGS=-Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' 'LDFLAGS=-L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/' 'CPP=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e'\"
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
This config.status script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
ac_pwd='/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1'
|
||||
srcdir='.'
|
||||
INSTALL='/usr/bin/install -c'
|
||||
MKDIR_P='/bin/mkdir -p'
|
||||
# If no file are specified by the user, then we need to provide default
|
||||
# value. By we need to know if files were specified by the user.
|
||||
ac_need_defaults=:
|
||||
while test $# != 0
|
||||
do
|
||||
case $1 in
|
||||
--*=*)
|
||||
ac_option=`expr "X$1" : 'X\([^=]*\)='`
|
||||
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
|
||||
ac_shift=:
|
||||
;;
|
||||
*)
|
||||
ac_option=$1
|
||||
ac_optarg=$2
|
||||
ac_shift=shift
|
||||
;;
|
||||
esac
|
||||
|
||||
case $ac_option in
|
||||
# Handling of the options.
|
||||
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
||||
ac_cs_recheck=: ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
|
||||
echo "$ac_cs_version"; exit ;;
|
||||
--debug | --debu | --deb | --de | --d | -d )
|
||||
debug=: ;;
|
||||
--file | --fil | --fi | --f )
|
||||
$ac_shift
|
||||
CONFIG_FILES="$CONFIG_FILES $ac_optarg"
|
||||
ac_need_defaults=false;;
|
||||
--he | --h | --help | --hel | -h )
|
||||
echo "$ac_cs_usage"; exit ;;
|
||||
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
|
||||
| -silent | --silent | --silen | --sile | --sil | --si | --s)
|
||||
ac_cs_silent=: ;;
|
||||
|
||||
# This is an error.
|
||||
-*) { echo "$as_me: error: unrecognized option: $1
|
||||
Try \`$0 --help' for more information." >&2
|
||||
{ (exit 1); exit 1; }; } ;;
|
||||
|
||||
*) ac_config_targets="$ac_config_targets $1"
|
||||
ac_need_defaults=false ;;
|
||||
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
ac_configure_extra_args=
|
||||
|
||||
if $ac_cs_silent; then
|
||||
exec 6>/dev/null
|
||||
ac_configure_extra_args="$ac_configure_extra_args --silent"
|
||||
fi
|
||||
|
||||
if $ac_cs_recheck; then
|
||||
echo "running CONFIG_SHELL=/bin/bash /bin/bash ./configure " '--target=powerpc-linux' '--host=powerpc-linux' '--build=x86_64-pc-linux-gnu' '--prefix=/usr' '--sysconfdir=/etc' '--disable-nls' '--disable-largefile' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=powerpc-linux' 'target_alias=powerpc-linux' 'CC=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' 'CFLAGS=-Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' 'LDFLAGS=-L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/' 'CPP=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' $ac_configure_extra_args " --no-create --no-recursion" >&6
|
||||
CONFIG_SHELL=/bin/bash
|
||||
export CONFIG_SHELL
|
||||
exec /bin/bash "./configure" '--target=powerpc-linux' '--host=powerpc-linux' '--build=x86_64-pc-linux-gnu' '--prefix=/usr' '--sysconfdir=/etc' '--disable-nls' '--disable-largefile' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=powerpc-linux' 'target_alias=powerpc-linux' 'CC=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' 'CFLAGS=-Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' 'LDFLAGS=-L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/' 'CPP=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e' $ac_configure_extra_args --no-create --no-recursion
|
||||
fi
|
||||
|
||||
exec 5>>config.log
|
||||
{
|
||||
echo
|
||||
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
|
||||
## Running $as_me. ##
|
||||
_ASBOX
|
||||
echo "$ac_log"
|
||||
} >&5
|
||||
|
||||
#
|
||||
# INIT-COMMANDS
|
||||
#
|
||||
AMDEP_TRUE="" ac_aux_dir="."
|
||||
|
||||
|
||||
# Handling of arguments.
|
||||
for ac_config_target in $ac_config_targets
|
||||
do
|
||||
case $ac_config_target in
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
|
||||
*) { { echo "$as_me:5558: error: invalid argument: $ac_config_target" >&5
|
||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# If the user did not use the arguments to specify the items to instantiate,
|
||||
# then the envvar interface is used. Set only those that are not.
|
||||
# We use the long form for the default assignment because of an extremely
|
||||
# bizarre bug on SunOS 4.1.3.
|
||||
if $ac_need_defaults; then
|
||||
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
|
||||
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
|
||||
fi
|
||||
|
||||
# Have a temporary directory for convenience. Make it in the build tree
|
||||
# simply because there is no reason against having it here, and in addition,
|
||||
# creating and moving files from /tmp can sometimes cause problems.
|
||||
# Hook for its removal unless debugging.
|
||||
# Note that there is a small window in which the directory will not be cleaned:
|
||||
# after its creation but before its name has been assigned to `$tmp'.
|
||||
$debug ||
|
||||
{
|
||||
tmp=
|
||||
trap 'exit_status=$?
|
||||
{ test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
|
||||
' 0
|
||||
trap '{ (exit 1); exit 1; }' 1 2 13 15
|
||||
}
|
||||
# Create a (secure) tmp directory for tmp files.
|
||||
|
||||
{
|
||||
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
|
||||
test -n "$tmp" && test -d "$tmp"
|
||||
} ||
|
||||
{
|
||||
tmp=./conf$$-$RANDOM
|
||||
(umask 077 && mkdir "$tmp")
|
||||
} ||
|
||||
{
|
||||
echo "$me: cannot create a temporary directory in ." >&2
|
||||
{ (exit 1); exit 1; }
|
||||
}
|
||||
|
||||
#
|
||||
# Set up the sed scripts for CONFIG_FILES section.
|
||||
#
|
||||
|
||||
# No need to generate the scripts if there are no CONFIG_FILES.
|
||||
# This happens for instance when ./config.status config.h
|
||||
if test -n "$CONFIG_FILES"; then
|
||||
|
||||
cat >"$tmp/subs-1.sed" <<\CEOF
|
||||
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
|
||||
s,@SHELL@,|#_!!_#|/bin/bash,g
|
||||
s,@PATH_SEPARATOR@,|#_!!_#|:,g
|
||||
s,@PACKAGE_NAME@,|#_!!_#|creGpioDae,g
|
||||
s,@PACKAGE_TARNAME@,|#_!!_#|cregpiodae,g
|
||||
s,@PACKAGE_VERSION@,|#_!!_#|0.0.1,g
|
||||
s,@PACKAGE_STRING@,|#_!!_#|creGpioDae 0.0.1,g
|
||||
s,@PACKAGE_BUGREPORT@,|#_!!_#|,g
|
||||
s,@exec_prefix@,|#_!!_#|${prefix},g
|
||||
s,@prefix@,|#_!!_#|/usr,g
|
||||
s,@program_transform_name@,|#_!!_#|s\,x\,x\,,g
|
||||
s,@bindir@,|#_!!_#|${exec_prefix}/bin,g
|
||||
s,@sbindir@,|#_!!_#|${exec_prefix}/sbin,g
|
||||
s,@libexecdir@,|#_!!_#|${exec_prefix}/libexec,g
|
||||
s,@datarootdir@,|#_!!_#|${prefix}/share,g
|
||||
s,@datadir@,|#_!!_#|${datarootdir},g
|
||||
s,@sysconfdir@,|#_!!_#|/etc,g
|
||||
s,@sharedstatedir@,|#_!!_#|${prefix}/com,g
|
||||
s,@localstatedir@,|#_!!_#|${prefix}/var,g
|
||||
s,@includedir@,|#_!!_#|${prefix}/include,g
|
||||
s,@oldincludedir@,|#_!!_#|/usr/include,g
|
||||
s,@docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g
|
||||
s,@infodir@,|#_!!_#|${datarootdir}/info,g
|
||||
s,@htmldir@,|#_!!_#|${docdir},g
|
||||
s,@dvidir@,|#_!!_#|${docdir},g
|
||||
s,@pdfdir@,|#_!!_#|${docdir},g
|
||||
s,@psdir@,|#_!!_#|${docdir},g
|
||||
s,@libdir@,|#_!!_#|${exec_prefix}/lib,g
|
||||
s,@localedir@,|#_!!_#|${datarootdir}/locale,g
|
||||
s,@mandir@,|#_!!_#|${datarootdir}/man,g
|
||||
s,@DEFS@,|#_!!_#|-DPACKAGE_NAME=\\"creGpioDae\\" -DPACKAGE_TARNAME=\\"cregpiodae\\" -DPACKAGE_VERSION=\\"0.0.1\\" -DPACKAGE_STRING=\\"creGpioDae\\ 0.0.1\\" -DPACKAGE_BUGREPORT=\\"\\" -DPACKAGE=\\"cregpiodae\\" -DVERSION=\\"0.0.1\\" -D_GNU_SOURCE=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MATH_H=1 -DHAVE_STDIO_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1,g
|
||||
s,@ECHO_C@,|#_!!_#|,g
|
||||
s,@ECHO_N@,|#_!!_#|-n,g
|
||||
s,@ECHO_T@,|#_!!_#|,g
|
||||
s,@LIBS@,|#_!!_#|,g
|
||||
s,@build_alias@,|#_!!_#|x86_64-pc-linux-gnu,g
|
||||
s,@host_alias@,|#_!!_#|powerpc-linux,g
|
||||
s,@target_alias@,|#_!!_#|powerpc-linux,g
|
||||
s,@INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g
|
||||
s,@INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g
|
||||
s,@INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g
|
||||
s,@am__isrc@,|#_!!_#|,g
|
||||
s,@CYGPATH_W@,|#_!!_#|echo,g
|
||||
s,@PACKAGE@,|#_!!_#|cregpiodae,g
|
||||
s,@VERSION@,|#_!!_#|0.0.1,g
|
||||
s,@ACLOCAL@,|#_!!_#|${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run aclocal-1.10,g
|
||||
s,@AUTOCONF@,|#_!!_#|${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run autoconf,g
|
||||
s,@AUTOMAKE@,|#_!!_#|${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run automake-1.10,g
|
||||
s,@AUTOHEADER@,|#_!!_#|${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run autoheader,g
|
||||
s,@MAKEINFO@,|#_!!_#|${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run makeinfo,g
|
||||
s,@install_sh@,|#_!!_#|$(SHELL) /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/install-sh,g
|
||||
s,@STRIP@,|#_!!_#|/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-strip,g
|
||||
s,@INSTALL_STRIP_PROGRAM@,|#_!!_#|$(install_sh) -c -s,g
|
||||
s,@mkdir_p@,|#_!!_#|/bin/mkdir -p,g
|
||||
s,@AWK@,|#_!!_#|gawk,g
|
||||
s,@SET_MAKE@,|#_!!_#|,g
|
||||
s,@am__leading_dot@,|#_!!_#|.,g
|
||||
s,@AMTAR@,|#_!!_#|${SHELL} /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/testapplication-0.0.1/missing --run tar,g
|
||||
s,@am__tar@,|#_!!_#|${AMTAR} chof - "$$tardir",g
|
||||
s,@am__untar@,|#_!!_#|${AMTAR} xf -,g
|
||||
s,@CC@,|#_!!_#|/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e,g
|
||||
s,@CFLAGS@,|#_!!_#|-Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e,g
|
||||
s,@LDFLAGS@,|#_!!_#|-L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/lib -L/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/,g
|
||||
s,@CPPFLAGS@,|#_!!_#|,g
|
||||
s,@ac_ct_CC@,|#_!!_#|,g
|
||||
s,@EXEEXT@,|#_!!_#|,g
|
||||
s,@OBJEXT@,|#_!!_#|o,g
|
||||
s,@DEPDIR@,|#_!!_#|.deps,g
|
||||
s,@am__include@,|#_!!_#|include,g
|
||||
s,@am__quote@,|#_!!_#|,g
|
||||
s,@AMDEP_TRUE@,|#_!!_#|,g
|
||||
s,@AMDEP_FALSE@,|#_!!_#|#,g
|
||||
s,@AMDEPBACKSLASH@,|#_!!_#|\\,g
|
||||
s,@CCDEPMODE@,|#_!!_#|depmode=gcc3,g
|
||||
s,@am__fastdepCC_TRUE@,|#_!!_#|,g
|
||||
s,@am__fastdepCC_FALSE@,|#_!!_#|#,g
|
||||
s,@CPP@,|#_!!_#|/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-cpp -Os -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/usr/include -I/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/include --sysroot=/home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir/ -isysroot /home/microkey/mmi/Projects/QUA_2475/buildroot/build_powerpc/staging_dir -mtune=603e,g
|
||||
s,@GREP@,|#_!!_#|/bin/grep,g
|
||||
s,@EGREP@,|#_!!_#|/bin/grep -E,g
|
||||
s,@LIBOBJS@,|#_!!_#|,g
|
||||
s,@LTLIBOBJS@,|#_!!_#|,g
|
||||
:end
|
||||
s/|#_!!_#|//g
|
||||
CEOF
|
||||
fi # test -n "$CONFIG_FILES"
|
||||
|
||||
|
||||
for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS
|
||||
do
|
||||
case $ac_tag in
|
||||
:[FHLC]) ac_mode=$ac_tag; continue;;
|
||||
esac
|
||||
case $ac_mode$ac_tag in
|
||||
:[FHL]*:*);;
|
||||
:L* | :C*:*) { { echo "$as_me:5764: error: Invalid tag $ac_tag." >&5
|
||||
echo "$as_me: error: Invalid tag $ac_tag." >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
:[FH]-) ac_tag=-:-;;
|
||||
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
|
||||
esac
|
||||
ac_save_IFS=$IFS
|
||||
IFS=:
|
||||
set x $ac_tag
|
||||
IFS=$ac_save_IFS
|
||||
shift
|
||||
ac_file=$1
|
||||
shift
|
||||
|
||||
case $ac_mode in
|
||||
:L) ac_source=$1;;
|
||||
:[FH])
|
||||
ac_file_inputs=
|
||||
for ac_f
|
||||
do
|
||||
case $ac_f in
|
||||
-) ac_f="$tmp/stdin";;
|
||||
*) # Look for the file first in the build tree, then in the source tree
|
||||
# (if the path is not absolute). The absolute path cannot be DOS-style,
|
||||
# because $ac_f cannot contain `:'.
|
||||
test -f "$ac_f" ||
|
||||
case $ac_f in
|
||||
[\\/$]*) false;;
|
||||
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
|
||||
esac ||
|
||||
{ { echo "$as_me:5794: error: cannot find input file: $ac_f" >&5
|
||||
echo "$as_me: error: cannot find input file: $ac_f" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
ac_file_inputs="$ac_file_inputs $ac_f"
|
||||
done
|
||||
|
||||
# Let's still pretend it is `configure' which instantiates (i.e., don't
|
||||
# use $as_me), people would be surprised to read:
|
||||
# /* config.h. Generated by config.status. */
|
||||
configure_input="Generated from "`IFS=:
|
||||
echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
|
||||
if test x"$ac_file" != x-; then
|
||||
configure_input="$ac_file. $configure_input"
|
||||
{ echo "$as_me:5808: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
fi
|
||||
|
||||
case $ac_tag in
|
||||
*:-:* | *:-) cat >"$tmp/stdin";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
ac_dir=`$as_dirname -- "$ac_file" ||
|
||||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$ac_file" : 'X\(//\)[^/]' \| \
|
||||
X"$ac_file" : 'X\(//\)$' \| \
|
||||
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$ac_file" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'`
|
||||
{ as_dir="$ac_dir"
|
||||
case $as_dir in #(
|
||||
-*) as_dir=./$as_dir;;
|
||||
esac
|
||||
test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
|
||||
as_dirs=
|
||||
while :; do
|
||||
case $as_dir in #(
|
||||
*\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
|
||||
*) as_qdir=$as_dir;;
|
||||
esac
|
||||
as_dirs="'$as_qdir' $as_dirs"
|
||||
as_dir=`$as_dirname -- "$as_dir" ||
|
||||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$as_dir" : 'X\(//\)[^/]' \| \
|
||||
X"$as_dir" : 'X\(//\)$' \| \
|
||||
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$as_dir" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'`
|
||||
test -d "$as_dir" && break
|
||||
done
|
||||
test -z "$as_dirs" || eval "mkdir $as_dirs"
|
||||
} || test -d "$as_dir" || { { echo "$as_me:5879: error: cannot create directory $as_dir" >&5
|
||||
echo "$as_me: error: cannot create directory $as_dir" >&2;}
|
||||
{ (exit 1); exit 1; }; }; }
|
||||
ac_builddir=.
|
||||
|
||||
case "$ac_dir" in
|
||||
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
|
||||
*)
|
||||
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
|
||||
# A ".." for each directory in $ac_dir_suffix.
|
||||
ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
|
||||
case $ac_top_builddir_sub in
|
||||
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
|
||||
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
|
||||
esac ;;
|
||||
esac
|
||||
ac_abs_top_builddir=$ac_pwd
|
||||
ac_abs_builddir=$ac_pwd$ac_dir_suffix
|
||||
# for backward compatibility:
|
||||
ac_top_builddir=$ac_top_build_prefix
|
||||
|
||||
case $srcdir in
|
||||
.) # We are building in place.
|
||||
ac_srcdir=.
|
||||
ac_top_srcdir=$ac_top_builddir_sub
|
||||
ac_abs_top_srcdir=$ac_pwd ;;
|
||||
[\\/]* | ?:[\\/]* ) # Absolute name.
|
||||
ac_srcdir=$srcdir$ac_dir_suffix;
|
||||
ac_top_srcdir=$srcdir
|
||||
ac_abs_top_srcdir=$srcdir ;;
|
||||
*) # Relative name.
|
||||
ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
|
||||
ac_top_srcdir=$ac_top_build_prefix$srcdir
|
||||
ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
|
||||
esac
|
||||
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
|
||||
|
||||
|
||||
case $ac_mode in
|
||||
:F)
|
||||
#
|
||||
# CONFIG_FILE
|
||||
#
|
||||
|
||||
case $INSTALL in
|
||||
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
|
||||
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
|
||||
esac
|
||||
ac_MKDIR_P=$MKDIR_P
|
||||
case $MKDIR_P in
|
||||
[\\/$]* | ?:[\\/]* ) ;;
|
||||
*/*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
|
||||
esac
|
||||
# If the template does not know about datarootdir, expand it.
|
||||
# FIXME: This hack should be removed a few years after 2.60.
|
||||
ac_datarootdir_hack=; ac_datarootdir_seen=
|
||||
|
||||
case `sed -n '/datarootdir/ {
|
||||
p
|
||||
q
|
||||
}
|
||||
/@datadir@/p
|
||||
/@docdir@/p
|
||||
/@infodir@/p
|
||||
/@localedir@/p
|
||||
/@mandir@/p
|
||||
' $ac_file_inputs` in
|
||||
*datarootdir*) ac_datarootdir_seen=yes;;
|
||||
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
|
||||
{ echo "$as_me:5951: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
|
||||
echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
|
||||
ac_datarootdir_hack='
|
||||
s&@datadir@&${datarootdir}&g
|
||||
s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
|
||||
s&@infodir@&${datarootdir}/info&g
|
||||
s&@localedir@&${datarootdir}/locale&g
|
||||
s&@mandir@&${datarootdir}/man&g
|
||||
s&\${datarootdir}&${prefix}/share&g' ;;
|
||||
esac
|
||||
sed "/^[ ]*VPATH[ ]*=/{
|
||||
s/:*\$(srcdir):*/:/
|
||||
s/:*\${srcdir}:*/:/
|
||||
s/:*@srcdir@:*/:/
|
||||
s/^\([^=]*=[ ]*\):*/\1/
|
||||
s/:*$//
|
||||
s/^[^=]*=[ ]*$//
|
||||
}
|
||||
|
||||
:t
|
||||
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
|
||||
s&@configure_input@&$configure_input&;t t
|
||||
s&@top_builddir@&$ac_top_builddir_sub&;t t
|
||||
s&@srcdir@&$ac_srcdir&;t t
|
||||
s&@abs_srcdir@&$ac_abs_srcdir&;t t
|
||||
s&@top_srcdir@&$ac_top_srcdir&;t t
|
||||
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
|
||||
s&@builddir@&$ac_builddir&;t t
|
||||
s&@abs_builddir@&$ac_abs_builddir&;t t
|
||||
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
|
||||
s&@INSTALL@&$ac_INSTALL&;t t
|
||||
s&@MKDIR_P@&$ac_MKDIR_P&;t t
|
||||
$ac_datarootdir_hack
|
||||
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
|
||||
|
||||
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
|
||||
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
|
||||
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
|
||||
{ echo "$as_me:5992: WARNING: $ac_file contains a reference to the variable \`datarootdir'
|
||||
which seems to be undefined. Please make sure it is defined." >&5
|
||||
echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
|
||||
which seems to be undefined. Please make sure it is defined." >&2;}
|
||||
|
||||
rm -f "$tmp/stdin"
|
||||
case $ac_file in
|
||||
-) cat "$tmp/out"; rm -f "$tmp/out";;
|
||||
*) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
|
||||
esac
|
||||
;;
|
||||
|
||||
|
||||
:C) { echo "$as_me:6005: executing $ac_file commands" >&5
|
||||
echo "$as_me: executing $ac_file commands" >&6;}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case $ac_file$ac_mode in
|
||||
"depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||
dirpart=`$as_dirname -- "$mf" ||
|
||||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$mf" : 'X\(//\)[^/]' \| \
|
||||
X"$mf" : 'X\(//\)$' \| \
|
||||
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$mf" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`$as_dirname -- "$file" ||
|
||||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$file" : 'X\(//\)[^/]' \| \
|
||||
X"$file" : 'X\(//\)$' \| \
|
||||
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$file" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'`
|
||||
{ as_dir=$dirpart/$fdir
|
||||
case $as_dir in #(
|
||||
-*) as_dir=./$as_dir;;
|
||||
esac
|
||||
test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
|
||||
as_dirs=
|
||||
while :; do
|
||||
case $as_dir in #(
|
||||
*\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
|
||||
*) as_qdir=$as_dir;;
|
||||
esac
|
||||
as_dirs="'$as_qdir' $as_dirs"
|
||||
as_dir=`$as_dirname -- "$as_dir" ||
|
||||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$as_dir" : 'X\(//\)[^/]' \| \
|
||||
X"$as_dir" : 'X\(//\)$' \| \
|
||||
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$as_dir" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'`
|
||||
test -d "$as_dir" && break
|
||||
done
|
||||
test -z "$as_dirs" || eval "mkdir $as_dirs"
|
||||
} || test -d "$as_dir" || { { echo "$as_me:6128: error: cannot create directory $as_dir" >&5
|
||||
echo "$as_me: error: cannot create directory $as_dir" >&2;}
|
||||
{ (exit 1); exit 1; }; }; }
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
;;
|
||||
|
||||
esac
|
||||
done # for ac_tag
|
||||
|
||||
|
||||
{ (exit 0); exit 0; }
|
||||
+6168
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(creGpioDae, 0.0.1)
|
||||
|
||||
# builtin(include, [m4/ac_func_snprintf.m4])dnl
|
||||
# builtin(include, [m4/ac_func_scanf_can_malloc.m4])dnl
|
||||
|
||||
AM_INIT_AUTOMAKE()
|
||||
# AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_GNU_SOURCE
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([parser.h iniparser.h])
|
||||
AC_CHECK_HEADERS([dictionary.h inistrings.h])
|
||||
AC_CHECK_HEADERS([math.h stdio.h])
|
||||
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h memory.h stddef.h stdint.h stdlib.h string.h strings.h unistd.h])
|
||||
# AC_CHECK_HEADERS([libgen.h getopt.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
# AC_TYPE_UID_T
|
||||
# AC_C_INLINE
|
||||
# AC_CHECK_TYPE(size_t, unsigned)
|
||||
# AC_CHECK_TYPE(ssize_t, signed)
|
||||
# AC_CHECK_MEMBERS([struct stat.st_rdev])
|
||||
|
||||
# Checks for library functions.
|
||||
# AC_CHECK_FUNCS([getopt_long getline strtof])
|
||||
# AC_FUNC_SNPRINTF
|
||||
# AC_FUNC_SCANF_CAN_MALLOC
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
# AC_OUTPUT([Makefile],[chmod a+x test-mount.sh test.sh])
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,589 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,519 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-12-25.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -0,0 +1,88 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* main.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: main file to QUA_2475 Test application
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Dez 11, 2008, MMi
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "bus.h"
|
||||
#include "BusProtocol.h"
|
||||
#include "protocolfunctions.h"
|
||||
|
||||
#include "digital_test.h"
|
||||
#include "smc4000io.h"
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int main()
|
||||
{
|
||||
int result;
|
||||
UINT16 testdata;
|
||||
|
||||
IO_CPU_Init();
|
||||
|
||||
testdata = 1;
|
||||
pwrrelmbWrite (IOCTL_interface, & testdata);
|
||||
printf ("dout_Write returned: %d\n", result);
|
||||
testdata = 0xFF;
|
||||
dout0_15Write (IOCTL_interface, & testdata);
|
||||
printf ("dout_Write returned: %d\n", result);
|
||||
|
||||
// /* Initialisation section */
|
||||
protocolInit(THISDEVICENUMBER, MAXDEVICENUMBER);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// printf ("Hallo\n");
|
||||
fflush( stdout );
|
||||
usleep ( 1000 );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#include <stdio.h>
|
||||
#include "BpPort.h"
|
||||
#include "mem_mod.h"
|
||||
|
||||
|
||||
extern void serWrite (
|
||||
int device,
|
||||
short length, /**< Lengh of data in bytes */
|
||||
char * data /**< Pointer to data */
|
||||
);
|
||||
|
||||
void Memmod_Init(memman *me,unsigned char buf_count,unsigned short buf_size)
|
||||
{
|
||||
unsigned char *buffer;
|
||||
unsigned short i;
|
||||
me->count = buf_count;
|
||||
me->size = buf_size;
|
||||
buffer = pvPortMalloc(buf_count*buf_size);
|
||||
me->buffer = buffer;
|
||||
me->free_index = buf_count;
|
||||
me->freelist = pvPortMalloc(buf_count*sizeof(link_item));
|
||||
for(i=0;i<buf_count;i++)
|
||||
{
|
||||
me->freelist[i].data = buffer;
|
||||
buffer = buffer+buf_size;
|
||||
}
|
||||
|
||||
pthread_mutex_init(&(me->mutex), NULL);
|
||||
}
|
||||
|
||||
unsigned char* Memmod_GetBuffer(memman *me)
|
||||
{
|
||||
return me->buffer;
|
||||
}
|
||||
|
||||
memman *Memmod_Create(unsigned char buf_count,unsigned short buf_size)
|
||||
{
|
||||
memman *new_item;
|
||||
new_item = (memman *)pvPortMalloc(sizeof(memman));
|
||||
Memmod_Init(new_item,buf_count,buf_size);
|
||||
return new_item;
|
||||
}
|
||||
|
||||
void *Memmod_Alloc(memman *me)
|
||||
{
|
||||
unsigned char index;
|
||||
void *retval;
|
||||
|
||||
pthread_mutex_lock(&(me->mutex));
|
||||
{
|
||||
index = me->free_index;
|
||||
if(index > 0)
|
||||
{
|
||||
index--;
|
||||
me->free_index=index;
|
||||
retval = me->freelist[index].data;
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(me->mutex));
|
||||
|
||||
if (retval == 0)
|
||||
{
|
||||
printf("mem_mod.c> no buffer available\n"); fflush(stdout);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void Memmod_Free(memman *me,void *buffer)
|
||||
{
|
||||
unsigned char index;
|
||||
|
||||
pthread_mutex_lock(&(me->mutex));
|
||||
{
|
||||
index = me->free_index;
|
||||
if(index < me->count)
|
||||
{
|
||||
me->freelist[index].data = buffer;
|
||||
index++;
|
||||
me->free_index=index;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&(me->mutex));
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef _MEM_MODH
|
||||
#define _MEM_MODH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
typedef struct link_item
|
||||
{
|
||||
void *data;
|
||||
} link_item;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char count;
|
||||
unsigned char size;
|
||||
unsigned char free_index;
|
||||
void *buffer;
|
||||
link_item *freelist;
|
||||
pthread_mutex_t mutex;
|
||||
} memman;
|
||||
|
||||
void Memmod_Init(memman *me,unsigned char buf_count,unsigned short buf_size);
|
||||
memman *Memmod_Create(unsigned char buf_count,unsigned short buf_size);
|
||||
unsigned char* Memmod_GetBuffer(memman *me);
|
||||
void *Memmod_Alloc(memman *me);
|
||||
void Memmod_Free(memman *me,void *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,367 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -0,0 +1,232 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* protocolfunctions. (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: collection of protocol-depending functions and
|
||||
initialisations
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Dez 11, 2008, MMi
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "bus.h"
|
||||
#include "BusProtocol.h"
|
||||
#include "protocolfunctions.h"
|
||||
|
||||
/* testfile includes */
|
||||
#include "analogue_test.h"
|
||||
#include "BUS_test.h"
|
||||
#include "CAN_test.h"
|
||||
#include "CF_test.h"
|
||||
#include "digital_test.h"
|
||||
#include "EEPROM_test.h"
|
||||
#include "ethernet_test.h"
|
||||
#include "LED_test.h"
|
||||
#include "relay_test.h"
|
||||
#include "USB_test.h"
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int sigio_interrupt = 0;
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void protocolInit (UINT32 DEV_ID, UINT32 MAX_ID)
|
||||
{
|
||||
bushandler = bpInit( BUS1, THISDEVICENUMBER, MAXDEVICENUMBER, 20 );
|
||||
BUS_ATTACHED = TRUE;
|
||||
|
||||
|
||||
/* Attach Handshake and Handshake return Functions to every device */
|
||||
bpAttachRpc (bushandler, 1, "Available BusID", (t_rpc_remote_procedure_call) availableBusID, 0);
|
||||
bpAttachRpcResult(bushandler, 1, (t_bp_rpcresult_callback) generalResultFunction, 0);
|
||||
|
||||
if (THISDEVICENUMBER == MASTERDEVICENUMBER)
|
||||
{
|
||||
/* This device is Master, attach Master functions to Bus */
|
||||
}
|
||||
|
||||
else if (THISDEVICENUMBER > MASTERDEVICENUMBER)
|
||||
{
|
||||
/* This device is slave, attach slave test functions to bus */
|
||||
/* Functions 0-9 are for general controlling options */
|
||||
bpAttachRpc (bushandler, 9, "Return attached functions", (t_rpc_remote_procedure_call) returnAttachedFunctions, 1);
|
||||
|
||||
/* Functions 10-19 are for calibrations purpose */
|
||||
/* Functions 20-29 re for single channel in-/output driving */
|
||||
bpAttachRpc (bushandler, 20, "Digital write channel", (t_rpc_remote_procedure_call) digitalWrite, 2);
|
||||
bpAttachRpc (bushandler, 21, "Digital write all", (t_rpc_remote_procedure_call) digitalWriteAll, 2);
|
||||
bpAttachRpc (bushandler, 22, "Digital read channel", (t_rpc_remote_procedure_call) digitalRead, 1);
|
||||
bpAttachRpc (bushandler, 23, "Digital read all", (t_rpc_remote_procedure_call) digitalReadAll, 1);
|
||||
|
||||
bpAttachRpc (bushandler, 24, "Analogue write channel", (t_rpc_remote_procedure_call) analogueWrite, 2);
|
||||
bpAttachRpc (bushandler, 25, "Analogue write all", (t_rpc_remote_procedure_call) analogueWriteAll, 2);
|
||||
bpAttachRpc (bushandler, 26, "Analogue read channel", (t_rpc_remote_procedure_call) analogueRead, 1);
|
||||
bpAttachRpc (bushandler, 27, "Analogue read all", (t_rpc_remote_procedure_call) analogueReadAll, 1);
|
||||
|
||||
bpAttachRpc (bushandler, 28, "Relay set channel", (t_rpc_remote_procedure_call) relaySet, 1);
|
||||
bpAttachRpc (bushandler, 29, "Relay set all", (t_rpc_remote_procedure_call) relaySetAll, 1);
|
||||
|
||||
|
||||
/* Functions 30-49 are for single test sequences */
|
||||
bpAttachRpc (bushandler, 30, "AnalogueMB Test", (t_rpc_remote_procedure_call) analogueMB_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 31, "AnalogueEB Test", (t_rpc_remote_procedure_call) analogueEB_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 32, "BUS Test", (t_rpc_remote_procedure_call) bus_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 33, "CAN Test", (t_rpc_remote_procedure_call) can_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 34, "CF Test", (t_rpc_remote_procedure_call) cf_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 35, "digitalMB Test", (t_rpc_remote_procedure_call) digitalMB_test_execute, 2);
|
||||
bpAttachRpc (bushandler, 36, "digitalEB Test", (t_rpc_remote_procedure_call) digitalEB_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 37, "EEPROM Test", (t_rpc_remote_procedure_call) eeprom_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 38, "ethernet Test", (t_rpc_remote_procedure_call) ethernet_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 39, "LED Test", (t_rpc_remote_procedure_call) led_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 40, "relayMB Test", (t_rpc_remote_procedure_call) relayMB_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 41, "relayEB Test", (t_rpc_remote_procedure_call) relayEB_test_execute, 0);
|
||||
bpAttachRpc (bushandler, 42, "USB Test", (t_rpc_remote_procedure_call) usb_test_execute, 0);
|
||||
/* Functions 50-59 are for miscellaneous purpose */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void returnAttachedFunctions (UINT8 senderId, UINT8 targetId, UINT8 requestNr,
|
||||
UINT8 functionId, UINT8 nrOfParams, UINT32 *params)
|
||||
{
|
||||
UINT8 functioncnt = 0;
|
||||
t_rpc_entity *lookupEntry;
|
||||
|
||||
if (nrOfParams == 0)
|
||||
{
|
||||
while (functioncnt < 61) /* Currently 60 functions in */
|
||||
{
|
||||
lookupEntry = bpLookupRpcEntry(bushandler, functioncnt);
|
||||
if (lookupEntry != 0)
|
||||
{
|
||||
bpSendRpcResult (bushandler, REMOTEDEVICENUMBER, 9, 1, 1, (INT32 *) lookupEntry->functionName);
|
||||
}
|
||||
functioncnt++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lookupEntry = bpLookupRpcEntry(bushandler, (UINT8) params);
|
||||
|
||||
if (lookupEntry != NULL)
|
||||
{
|
||||
bpSendRpcResult (bushandler, REMOTEDEVICENUMBER, 9, 1, 1, (INT32 *) lookupEntry->functionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void availableBusID (UINT8 senderId, UINT8 targetId, UINT8 requestNr,
|
||||
UINT8 functionId, UINT8 nrOfParams, UINT32 *params)
|
||||
{
|
||||
/* Call Result Function to release Semaphore on Master */
|
||||
bpSendRpcResult(bushandler, 1, 1, 1, 0, NULL);
|
||||
}
|
||||
|
||||
|
||||
void generalResultFunction (UINT8 requestNr, UINT8 nrOfResults, UINT32 *results)
|
||||
{
|
||||
/* Release generalSemaphore on Call of this Function from the Master */
|
||||
// xSemaphoreGive (generalSemaphore);
|
||||
}
|
||||
|
||||
|
||||
void IO_CPU_Init (void)
|
||||
{
|
||||
IOCTL_interface = -1;
|
||||
|
||||
unsigned int oflags;
|
||||
int err;
|
||||
/* Install signal handler for the control+c signal. */
|
||||
signal(SIGINT,sigintHandler);
|
||||
|
||||
/* Install signal handler for the SIGIO signal from the IO controller. */
|
||||
signal(SIGIO, sigintHandler);
|
||||
|
||||
/* Open the interface with the IO controller. */
|
||||
IOCTL_interface = open("/dev/ioc", O_RDONLY);
|
||||
if (IOCTL_interface == -1)
|
||||
{
|
||||
printf ("Failed to open IO controller (error %s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
// /* Register this process' as SIGIO signal receiver from IO controller. */
|
||||
// if (fcntl(IOCTL_interface, F_SETOWN, getpid()) == -1)
|
||||
// {
|
||||
// printf ("Failed to F_SETOWN for IO controller (error %s)\n",
|
||||
// strerror(errno));
|
||||
// }
|
||||
|
||||
// /* Enable asynchronous notification. */
|
||||
// oflags = fcntl (IOCTL_interface, F_GETFL);
|
||||
// if (fcntl(IOCTL_interface, F_SETFL, oflags | FASYNC) == -1)
|
||||
// {
|
||||
// printf ("Failed to F_SETFL for IO controller (error %s)\n",
|
||||
// strerror(errno));
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
void appExit (int err)
|
||||
{
|
||||
if (IOCTL_interface > 0)
|
||||
{
|
||||
close (IOCTL_interface);
|
||||
}
|
||||
exit (err);
|
||||
}
|
||||
|
||||
void sigintHandler (int s)
|
||||
{
|
||||
switch (s)
|
||||
{
|
||||
case SIGINT:
|
||||
printf("received SIGINT signal.\n");
|
||||
appExit (0);
|
||||
break;
|
||||
case SIGIO:
|
||||
sigio_interrupt = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* protocolfunctions.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 11, 2008, MMi
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "bus.h"
|
||||
#include "BusProtocol.h"
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define MASTERDEVICENUMBER 1
|
||||
#define THISDEVICENUMBER 2
|
||||
#define REMOTEDEVICENUMBER 1
|
||||
#define MAXDEVICENUMBER 2
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
int bushandler; /* Bus system identifier */
|
||||
int IOCTL_interface;
|
||||
BOOLEAN BUS_ATTACHED;
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void protocolInit (UINT32 DEV_ID, UINT32 MAX_ID);
|
||||
|
||||
void returnAttachedFunctions (UINT8 senderId, UINT8 targetId, UINT8 requestNr,
|
||||
UINT8 functionId, UINT8 nrOfParams, UINT32 *params);
|
||||
|
||||
void availableBusID (UINT8 senderId, UINT8 targetId, UINT8 requestNr,
|
||||
UINT8 functionId, UINT8 nrOfParams, UINT32 *params);
|
||||
|
||||
void generalResultFunction (UINT8 requestNr, UINT8 nrOfResults, UINT32 *results);
|
||||
|
||||
void IO_CPU_Init (void);
|
||||
|
||||
void appExit (int err);
|
||||
|
||||
void sigintHandler (int s);
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
@@ -0,0 +1,228 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* smc4000io.c - v1.2 (c) 2007 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AA Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description: SMC4000 IO functions.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 1.0, 31-07-2006, Henk Stegeman.
|
||||
* Creation.
|
||||
* 1.1, 12-10-2007, Jos Pasop.
|
||||
* Added extenderboard support.
|
||||
* 1.2, 27-11-2007, Jos Pasop.
|
||||
* Added callibration tables for DAC.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
#include "smc4000io.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define AIN0_7 0x1
|
||||
#define AOUT0_5 0x2
|
||||
#define DIN0_7 0x3
|
||||
#define DOUT0_15 0x4
|
||||
#define REL0_5 0x5
|
||||
#define RTC 0x6
|
||||
#define VCC 0x7
|
||||
#define VCORE 0x8
|
||||
#define VDDAT 0x9
|
||||
#define VBAT 0xa
|
||||
#define TEMP 0xb
|
||||
#define REVNUM 0xc
|
||||
#define EXTBOARD 0xd
|
||||
#define DINEXT0_3 0xe
|
||||
#define DOUTEXT0_3 0xf
|
||||
#define PWRRELMB 0x10
|
||||
#define PWRRELEB 0x11
|
||||
#define AIN0_15 0x12
|
||||
#define AOUT0_11 0x13
|
||||
#define SERMB 0x14
|
||||
#define SEREB 0x15
|
||||
#define ADCCALMB 0x16
|
||||
#define ADCCALEB 0x17
|
||||
#define DACCALMB 0x18
|
||||
#define DACCALEB 0x19
|
||||
|
||||
#define READ_CMD(id) (id | 0x8000)
|
||||
#define WRITE_CMD(id) (id)
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
int ain0_7Read (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(AIN0_7), data);
|
||||
}
|
||||
|
||||
int aout0_5Write (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(AOUT0_5), data);
|
||||
}
|
||||
|
||||
int din0_7Read (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(DIN0_7), data);
|
||||
}
|
||||
|
||||
int dout0_15Write (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(DOUT0_15), data);
|
||||
}
|
||||
|
||||
int rel0_5Write (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(REL0_5), data);
|
||||
}
|
||||
|
||||
int vccRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(VCC), data);
|
||||
}
|
||||
|
||||
int vddatRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(VDDAT), data);
|
||||
}
|
||||
|
||||
int vbatRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(VBAT), data);
|
||||
}
|
||||
|
||||
int vcoreRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(VCORE), data);
|
||||
}
|
||||
|
||||
int tempRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(TEMP), data);
|
||||
}
|
||||
|
||||
int revnumRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(REVNUM), data);
|
||||
}
|
||||
|
||||
int extboardRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(EXTBOARD), data);
|
||||
}
|
||||
|
||||
int dinext0_3Read (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(DINEXT0_3), data);
|
||||
}
|
||||
|
||||
int doutext0_3Write (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(DOUTEXT0_3), data);
|
||||
}
|
||||
|
||||
int pwrrelmbWrite (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(PWRRELMB), data);
|
||||
}
|
||||
|
||||
int pwrrelebWrite (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(PWRRELEB), data);
|
||||
}
|
||||
|
||||
int ain0_15Read (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(AIN0_15), data);
|
||||
}
|
||||
|
||||
int aout0_11Write (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(AOUT0_11), data);
|
||||
}
|
||||
|
||||
int sermbRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(SERMB), data);
|
||||
}
|
||||
|
||||
int serebRead (int file, UINT16 * data)
|
||||
{
|
||||
return ioctl (file, READ_CMD(SEREB), data);
|
||||
}
|
||||
|
||||
int adccalmbRead (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, READ_CMD(ADCCALMB), (UINT16 * ) data);
|
||||
}
|
||||
|
||||
int adccalmbWrite (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(ADCCALMB), (UINT16 * ) data);
|
||||
}
|
||||
|
||||
int adccalebRead (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, READ_CMD(ADCCALEB), (UINT16 *) data);
|
||||
}
|
||||
|
||||
int adccalebWrite (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(ADCCALEB), (UINT16 *) data);
|
||||
}
|
||||
|
||||
int daccalmbRead (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, READ_CMD(DACCALMB), (UINT16 * ) data);
|
||||
}
|
||||
|
||||
int daccalmbWrite (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(DACCALMB), (UINT16 * ) data);
|
||||
}
|
||||
|
||||
int daccalebRead (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, READ_CMD(DACCALEB), (UINT16 *) data);
|
||||
}
|
||||
|
||||
int daccalebWrite (int file, CALIBRATION_VALUE_DESCR data [])
|
||||
{
|
||||
return ioctl (file, WRITE_CMD(DACCALEB), (UINT16 *) data);
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* smc4000io.h - v1.2 (c) 2007 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AA Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description: Modbus IO functions interface description.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 1.0, 31-06-2006, Henk Stegeman.
|
||||
* Creation.
|
||||
* 1.1, 12-10-2007, Jos Pasop.
|
||||
* Added extenderboard support.
|
||||
* 1.2, 27-11-2007, Jos Pasop.
|
||||
* Added callibration tables for DAC.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
/*!\file smc4000io.h
|
||||
* \brief SMC4000 IO functions interface description.
|
||||
*/
|
||||
#ifndef SMC4000IO_H_
|
||||
#define SMC4000IO_H_
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
UINT16 iCal4;
|
||||
UINT16 iCal12;
|
||||
UINT16 iCal20;
|
||||
} CALIBRATION_VALUE_DESCR;
|
||||
|
||||
/* ADC calibration values for the motherboard and extenderboard can be stored
|
||||
* in arrays defined as.
|
||||
*
|
||||
* CALIBRATION_VALUE_DESCR calMB [8];
|
||||
* CALIBRATION_VALUE_DESCR calEB [8];
|
||||
*
|
||||
*/
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
int ain0_7Read (int file, UINT16 * data);
|
||||
int aout0_5Write (int file, UINT16 * data);
|
||||
int din0_7Read (int file, UINT16 * data);
|
||||
int dout0_15Write (int file, UINT16 * data);
|
||||
int rel0_5Write (int file, UINT16 * data);
|
||||
int vccRead (int file, UINT16 * data);
|
||||
int vddatRead (int file, UINT16 * data);
|
||||
int vbatRead (int file, UINT16 * data);
|
||||
int vcoreRead (int file, UINT16 * data);
|
||||
int tempRead (int file, UINT16 * data);
|
||||
int revnumRead (int file, UINT16 * data);
|
||||
int extboardRead (int file, UINT16 * data);
|
||||
int dinext0_3Read (int file, UINT16 * data);
|
||||
int doutext0_3Write (int file, UINT16 * data);
|
||||
int pwrrelmbWrite (int file, UINT16 * data);
|
||||
int pwrrelebWrite (int file, UINT16 * data);
|
||||
int ain0_15Read (int file, UINT16 * data);
|
||||
int aout0_11Write (int file, UINT16 * data);
|
||||
int sermbRead (int file, UINT16 * data);
|
||||
int serebRead (int file, UINT16 * data);
|
||||
int adccalmbRead (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int adccalmbWrite (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int adccalebRead (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int adccalebWrite (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int daccalmbRead (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int daccalmbWrite (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int daccalebRead (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
int daccalebWrite (int file, CALIBRATION_VALUE_DESCR data []);
|
||||
#endif /*SMC4000IO_H_*/
|
||||
Binary file not shown.
@@ -0,0 +1,108 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* types.h - v0.1 (c) 2007 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: Contains definitions of native types.
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, 10-09-2007, Marcel Mulder.
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __TYPES_H__
|
||||
#define __TYPES_H__
|
||||
/** \file types.h
|
||||
\brief Contains the native types of LPC2378
|
||||
*/
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define UINT8 unsigned char
|
||||
#define UINT16 unsigned short
|
||||
#define UINT32 unsigned int
|
||||
|
||||
|
||||
typedef unsigned long long UINT64; // Unsigned 64 bit quantity
|
||||
|
||||
|
||||
#define pUINT8 unsigned char *
|
||||
#define pUINT16 unsigned short *
|
||||
#define pUINT32 unsigned int *
|
||||
|
||||
|
||||
#define INT8 char
|
||||
#define INT16 short
|
||||
#define INT32 int
|
||||
|
||||
|
||||
#define pINT8 char *
|
||||
#define pINT16 short *
|
||||
#define pINT32 int *
|
||||
|
||||
|
||||
#ifndef BIT
|
||||
#define BIT(n) (1L << (n))
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (0)
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef fsasfd
|
||||
typedef enum
|
||||
{
|
||||
FALSE = 0, /**< Definition of false*/
|
||||
TRUE
|
||||
} BOOLEAN;
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (1 == 0)
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (1==1)
|
||||
#endif
|
||||
|
||||
#define BOOLEAN char
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ERROR = 0, /**< Definition for ERROR*/
|
||||
OK
|
||||
} RESULT;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#endif /* __TYPES_H__ */
|
||||
Reference in New Issue
Block a user