indented using indent.sh script.

This commit is contained in:
skarg
2013-10-29 01:55:49 +00:00
parent e3da7d7fed
commit 56b65e9694
43 changed files with 785 additions and 659 deletions
+2 -2
View File
@@ -648,7 +648,7 @@ int Device_Read_Property_Local(
return 0;
}
apdu = rpdata->application_data;
switch ((int)rpdata->object_property) {
switch ((int) rpdata->object_property) {
case PROP_DESCRIPTION:
characterstring_init_ansi(&char_string, "BACnet Demo");
apdu_len =
@@ -851,7 +851,7 @@ bool Device_Write_Property_Local(
wp_data->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
return false;
}
switch ((int)wp_data->object_property) {
switch ((int) wp_data->object_property) {
case PROP_OBJECT_IDENTIFIER:
if (value.tag == BACNET_APPLICATION_TAG_OBJECT_ID) {
if ((value.type.Object_Id.type == OBJECT_DEVICE) &&
+32 -29
View File
@@ -1,29 +1,32 @@
// The following functions must be written in ARM mode
// these functions are called directly by an exception vector
//------------------------------------------------------------------------------
// Internal functions
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
/// Default spurious interrupt handler. Infinite loop.
//------------------------------------------------------------------------------
void AT91F_Spurious_handler( void )
{
while (1);
}
//------------------------------------------------------------------------------
/// Default handler for fast interrupt requests. Infinite loop.
//------------------------------------------------------------------------------
void AT91F_Default_FIQ_handler( void )
{
while (1);
}
//------------------------------------------------------------------------------
/// Default handler for standard interrupt requests. Infinite loop.
//------------------------------------------------------------------------------
void AT91F_Default_IRQ_handler( void )
{
while (1);
}
// The following functions must be written in ARM mode
// these functions are called directly by an exception vector
//------------------------------------------------------------------------------
// Internal functions
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
/// Default spurious interrupt handler. Infinite loop.
//------------------------------------------------------------------------------
void AT91F_Spurious_handler(
void)
{
while (1);
}
//------------------------------------------------------------------------------
/// Default handler for fast interrupt requests. Infinite loop.
//------------------------------------------------------------------------------
void AT91F_Default_FIQ_handler(
void)
{
while (1);
}
//------------------------------------------------------------------------------
/// Default handler for standard interrupt requests. Infinite loop.
//------------------------------------------------------------------------------
void AT91F_Default_IRQ_handler(
void)
{
while (1);
}
+1 -2
View File
@@ -295,8 +295,7 @@ int Device_Read_Property(
}
} else {
if (Device_Object_List_Identifier(rpdata->array_index,
&object_type,
&instance))
&object_type, &instance))
apdu_len =
encode_application_object_id(&apdu[0], object_type,
instance);
+2 -3
View File
@@ -875,9 +875,8 @@ bool dlmstp_init(
return false;
}
poSharedData =
(SHARED_MSTP_DATA *) ((struct mstp_port_struct_t *) mstp_port)->
UserData;
poSharedData = (SHARED_MSTP_DATA *) ((struct mstp_port_struct_t *)
mstp_port)->UserData;
if (!poSharedData) {
return false;
}
+1 -1
View File
@@ -112,7 +112,7 @@ bool rs485_receive_error(
return false;
}
/*********************************************************************//**
/*********************************************************************//**
* @brief USARTx interrupt handler sub-routine
* @param[in] None
* @return None
+6 -10
View File
@@ -131,7 +131,8 @@ void RS485_Set_Interface(
* ALGORITHM: none
* NOTES: none
*****************************************************************************/
bool RS485_Interface_Valid(unsigned port_number)
bool RS485_Interface_Valid(
unsigned port_number)
{
HANDLE h = 0;
DWORD err = 0;
@@ -139,17 +140,12 @@ bool RS485_Interface_Valid(unsigned port_number)
char ifname[255] = "";
sprintf(ifname, "\\\\.\\COM%u", port_number);
h = CreateFile(
ifname,
GENERIC_READ | GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, 0,
NULL);
h = CreateFile(ifname, GENERIC_READ | GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, 0, NULL);
if (h == INVALID_HANDLE_VALUE) {
err = GetLastError();
if ((err == ERROR_ACCESS_DENIED) ||
(err == ERROR_GEN_FAILURE) ||
(err == ERROR_SHARING_VIOLATION) ||
(err == ERROR_SEM_TIMEOUT)) {
if ((err == ERROR_ACCESS_DENIED) || (err == ERROR_GEN_FAILURE) ||
(err == ERROR_SHARING_VIOLATION) || (err == ERROR_SEM_TIMEOUT)) {
status = true;
}
} else {
+2 -1
View File
@@ -68,7 +68,8 @@ extern "C" {
void RS485_Print_Error(
void);
bool RS485_Interface_Valid(unsigned port_number);
bool RS485_Interface_Valid(
unsigned port_number);
#ifdef __cplusplus