Spi_get_error( ) function, Syntax, Example – Echelon Neuron C User Manual
Page 157: Strcat( ) function
Neuron C Reference Guide
137
spi_get_error( )
Function
The spi_get_error( ) built-in function returns a cumulative OR of the bits shown
below to specify data errors. Calling this function clears the SPI error state.
0x10 Mode
fault
occurred
0x20
Receive overrun detected
Syntax
unsigned short spi_get_error (
io-object-name
);
Example
IO_8 spi master clock(4) iospi;
when (io_out_ready(iospi)) {
unsigned short spi_error;
spi_error = spi_get_error(iospi));
if (spi_error) {
// Process SPI error
}
else {
// Process end of SPI transmission ...
}
}
strcat( )
Function
The strcat( ) function appends a copy of the string
src
to the end of the string
dest
, resulting in concatenated strings (thus the name strcat, from string
concatenate). The function returns a pointer to the string
dest
. See also strchr( ),
strcmp( ), strcpy( ), strlen( ), strncat( ), strncmp( ), strncpy( ), and strrchr( ).
This function cannot be used to copy overlapping areas of memory, or to write
into EEPROM memory or network variables.
Syntax
#include
char *strcat (char *
dest
, const char *
src
);
Example
#include
void f(void)
{
char
buf[40]
strcpy(buf,
"Hello");
strcat(buf, " World");
// buf contains "Hello World"
...
}