100 #define MISO_TIMEOUT 1000 115 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F' 121 '0',
'x',
'0',
'0',
'\0' 137 #define QUEUE_ELEMENTS 250 140 #define QUEUE_SIZE (QUEUE_ELEMENTS + 1) 158 help = Serial.available();
173 help = Serial.available();
202 if (Serial.available())
217 if (Serial.available())
220 while (millis() < ms);
283 long delay_count = 0;
286 if (
input(MISO) == 1)
break;
298 long delay_count = 0;
301 if (
input(MISO) == 0)
break;
323 Serial.print(F(
"USBSPI,PIC,02,02,DC,DC590,tinyDC590-DC2574A_KIT-\n"));
331 Serial.print(F(
"LTC2947,Cls,D2947,01,01,DC,DC2334A,-------------\n"));
346 digitalWrite(pin - 0x30 + 2, pin_value ==
'0' ? LOW : HIGH);
352 Serial.print(digitalRead(pin - 0x30 + 2));
359 pinMode(pin - 0x30 + 2, pin_value ==
'0' ? INPUT : OUTPUT);
438 Serial.print(
"hello\n");
const byte i2c_auxiliary_mode
char get_char()
Gets the character.
static uint8_t QueueIn
The queue in element.
char hex_digits[16]
hex conversion constants
#define output_high(pin)
Set "pin" high.
char byte_to_hex_buffer[3]
buffer for byte to ASCII hex conversion
static uint8_t QueueOut
The queue out element.
Header File for Linduino Libraries and Demo Code.
boolean DelayAndCheckSerialData(unsigned long ms)
Delay and check serial data.
boolean dc590Busy
DC590 busy flag.
void spi_write(int8_t data)
Write a data byte using the SPI hardware.
char hex_to_byte_buffer[5]
buffer for ASCII hex to byte conversion
static void byte_to_hex(byte value)
convert a Byte to two hexadecimal characters.
int8_t i2c_start()
Write start bit to the hardware I2C port.
static uint8_t Queue[QUEUE_SIZE]
The queue.
union LT_union_int32_4bytes data
#define WITH_NACK
Use with i2c_read(WITH_NACK) to read without an acknowledge.
#define QUEUE_ELEMENTS
max elements in the queue
#define QUIKEVAL_GPIO
Linduino QuikEval GPIO pin (QuikEval connector pin 14) connects to Arduino pin 9. ...
int8_t i2c_write(uint8_t data)
Send a data byte to hardware I2C port.
#define output_low(pin)
Set "pin" low.
#define input(pin)
Return the state of pin "pin".
boolean CheckSerialData()
Determines if serial data is available and stores data in the queue.
char DequeueChar()
Dequeue character.
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
boolean tinyDC590B(char command)
process commands received via serial interface.
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
int8_t spi_read(int8_t data)
The data byte to be written.
byte read_hex()
Reads hexadecimal value from serial port read 2 hex characters from the serial buffer and convert the...
uint8_t i2c_read(int8_t ack)
Read a data byte from the hardware I2C port.
#define QUEUE_SIZE
queue size.
void quikeval_I2C_connect(void)
Switch MUX to connect I2C pins to QuikEval connector.
#define WITH_ACK
Use with i2c_read(WITH_ACK) to read with an acknowledge.
#define QUIKEVAL_CS
QuikEval CS pin (SPI chip select on QuikEval connector pin 6) connects to Arduino SS pin...
static void EnqueueSerialData()
Enqueue serial data.
unsigned char pseudo_reset