Commit 5fe80bbe authored by Peter Zumbruch's avatar Peter Zumbruch
Browse files

introducing SPI

with dummy structure


git-svn-id: https://subversion.gsi.de/epics/trunk/hadcon/API-Slave@412 50339f28-a4cd-11e1-ab1f-8360dde1fe65
parent ff9b96dc
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>API-Slave (4.6)</name>
<name>API-Slave (4.6.1)</name>
<comment></comment>
<projects>
</projects>
......
......@@ -392,11 +392,11 @@ static const char commandShortDescription43[] PROGMEM = "";
static const uint8_t commandImplementation43 PROGMEM = FALSE;
// index: 44
static const char commandKeyword44[] PROGMEM = "CMD4"; /* command (dummy name) */
static const char commandSyntax44[] PROGMEM = "[???]";
static const char commandSyntaxAlternative44[] PROGMEM = "";
static const char commandShortDescription44[] PROGMEM = "";
static const uint8_t commandImplementation44 PROGMEM = FALSE;
static const char commandKeyword44[] PROGMEM = "SPI"; /* SPI master */
static const char commandSyntax44[] PROGMEM = "[data]";
static const char commandSyntaxAlternative44[] PROGMEM = "<cmd> <arguments>";
static const char commandShortDescription44[] PROGMEM = "experimental SPI master (slave)";
static const uint8_t commandImplementation44 PROGMEM = TRUE;
// index: 45
static const char commandKeyword45[] PROGMEM = "GNWR"; /* send <address> <data> for waveform generator */
......@@ -762,7 +762,9 @@ void Process_Uart_Event(void)
case commandKeyNumber_OWSA:
case commandKeyNumber_RLTH:
case commandKeyNumber_TWIS:
case commandKeyNumber_I2C:
case commandKeyNumber_DEBG:
case commandKeyNumber_SPI:
Choose_Function(ptr_uartStruct);
break;
/*use 1-wire parsing*/
......@@ -1388,7 +1390,8 @@ void Choose_Function( struct uartStruct *ptr_uartStruct )
case commandKeyNumber_CMD3: /* command (dummy name) */
PINA |= 0x01;
break;
case commandKeyNumber_CMD4: /* command (dummy name) */
case commandKeyNumber_SPI: /* command (dummy name) */
spiApi(ptr_uartStruct);
break;
case commandKeyNumber_GNWR: /* generator write */
waveformGeneratorWriteRegister(ptr_uartStruct);
......
......@@ -226,7 +226,7 @@ enum cmdKeyNumber
commandKeyNumber_CMD1,
commandKeyNumber_CMD2,
commandKeyNumber_CMD3,
commandKeyNumber_CMD4,
commandKeyNumber_SPI,
commandKeyNumber_GNWR,
commandKeyNumber_GNRE,
commandKeyNumber_OW8S,
......
......@@ -2,7 +2,7 @@
#define API_DEFINE__H
/*the define.h header file contents all define variable*/
#define CODE_VERSION "4.6"
#define CODE_VERSION "4.6.1"
#ifndef HADCON_VERSION
#define HADCON_VERSION 2
......
......@@ -553,7 +553,7 @@ void help(struct uartStruct *ptr_uartStruct)
snprintf_P(uart_message_string, BUFFER_SIZE - 1, PSTR("%s response: %s [???] "), message, currentReceiveHeader );
UART0_Send_Message_String_p(NULL,0);
break;
case commandKeyNumber_CMD4: /* command (dummy name) */
case commandKeyNumber_SPI: /* command (dummy name) */
snprintf_P(uart_message_string, BUFFER_SIZE - 1, PSTR("%s command (dummy name) "), message );
UART0_Send_Message_String_p(NULL,0);
snprintf_P(uart_message_string, BUFFER_SIZE - 1, PSTR("%s command : %s [???]"), message, currentCommandKeyword );
......
This diff is collapsed.
/*
* spiApi.c
*
* Created on: 22.05.2013
* Author: Peter Zumbruch, GSI, P.Zumbruch@gsi.de
*/
#include "spiApi.h"
void spiApi(struct uartStruct *ptr_uartStruct)
{
}
//spiWrite()
//spiRead() ?
//spiInit()
//spiEnable()
/*
* spiApi.h
*
* Created on: 22.05.2013
* Author: Peter Zumbruch, GSI, P.Zumbruch@gsi.de
*/
#ifndef SPIAPI_H_
#define SPIAPI_H_
#include "api.h"
#include "api_define.h"
#include "api_global.h"
#include "api_debug.h"
void spiApi(struct uartStruct *ptr_uartStruct);
#endif /* SPIAPI_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment