Cleaned up PIC18F6720 project to enable mostly clean compile and build with latest MPLab (8.x) and MCC18 compiler (3.x).
This commit is contained in:
@@ -710,7 +710,7 @@ typedef enum {
|
||||
PROP_STATE_ZONE_OCCUPANCY_STATE = 31,
|
||||
PROP_STATE_ACCESS_CRED_DISABLE_REASON = 32,
|
||||
PROP_STATE_ACCESS_CRED_DISABLE = 33,
|
||||
PROP_STATE_AUTHENTICATION_STATUS = 34,
|
||||
PROP_STATE_AUTHENTICATION_STATUS = 34
|
||||
} BACNET_PROPERTY_STATES;
|
||||
|
||||
typedef enum {
|
||||
@@ -897,15 +897,15 @@ typedef enum {
|
||||
OBJECT_ACCESS_USER = 35,
|
||||
OBJECT_ACCESS_ZONE = 36,
|
||||
OBJECT_AUTHENTICATION_FACTOR_INPUT = 37,
|
||||
MAX_ASHRAE_OBJECT_TYPE = 38
|
||||
|
||||
/* Enumerated values 0-127 are reserved for definition by ASHRAE. */
|
||||
/* Enumerated values 128-1023 may be used by others subject to */
|
||||
/* the procedures and constraints described in Clause 23. */
|
||||
|
||||
/* used for bit string loop */
|
||||
MAX_ASHRAE_OBJECT_TYPE = 38,
|
||||
MAX_BACNET_OBJECT_TYPE = 1023
|
||||
} BACNET_OBJECT_TYPE;
|
||||
/* used for bit string loop */
|
||||
#define MAX_BACNET_OBJECT_TYPE 1023
|
||||
|
||||
typedef enum {
|
||||
SEGMENTATION_BOTH = 0,
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
magic_cookie={66E99B07-E706-4689-9E80-9B2582898A13}
|
||||
file_version=1.0
|
||||
[PATH_INFO]
|
||||
BuildDirPolicy=BuildDirIsSourceDir
|
||||
dir_src=
|
||||
dir_bin=
|
||||
dir_tmp=
|
||||
dir_sin=
|
||||
dir_inc=C:\code\bacnet-stack;C:\code\bacnet-stack\demo\handler;C:\code\bacnet-stack\demo\object;C:\code\bacnet-stack\ports\pic18f6720
|
||||
dir_inc=C:\code\bacnet-stack\include;C:\code\bacnet-stack\ports\pic18f6720
|
||||
dir_lib=C:\mcc18\lib
|
||||
dir_lkr=
|
||||
[CAT_FILTERS]
|
||||
@@ -15,6 +16,134 @@ filter_inc=*.h;*.inc
|
||||
filter_obj=*.o
|
||||
filter_lib=*.lib
|
||||
filter_lkr=*.lkr
|
||||
[CAT_SUBFOLDERS]
|
||||
subfolder_src=
|
||||
subfolder_inc=
|
||||
subfolder_obj=
|
||||
subfolder_lib=
|
||||
subfolder_lkr=
|
||||
[FILE_SUBFOLDERS]
|
||||
file_000=.
|
||||
file_001=.
|
||||
file_002=.
|
||||
file_003=.
|
||||
file_004=.
|
||||
file_005=.
|
||||
file_006=.
|
||||
file_007=.
|
||||
file_008=.
|
||||
file_009=.
|
||||
file_010=.
|
||||
file_011=.
|
||||
file_012=.
|
||||
file_013=.
|
||||
file_014=.
|
||||
file_015=.
|
||||
file_016=.
|
||||
file_017=.
|
||||
file_018=.
|
||||
file_019=.
|
||||
file_020=.
|
||||
file_021=.
|
||||
file_022=.
|
||||
file_023=.
|
||||
file_024=.
|
||||
file_025=.
|
||||
file_026=.
|
||||
file_027=.
|
||||
file_028=.
|
||||
file_029=.
|
||||
file_030=.
|
||||
file_031=.
|
||||
file_032=.
|
||||
file_033=.
|
||||
file_034=.
|
||||
file_035=.
|
||||
file_036=.
|
||||
file_037=.
|
||||
file_038=.
|
||||
file_039=.
|
||||
file_040=.
|
||||
file_041=.
|
||||
file_042=.
|
||||
file_043=.
|
||||
file_044=.
|
||||
file_045=.
|
||||
file_046=.
|
||||
file_047=.
|
||||
file_048=.
|
||||
file_049=.
|
||||
file_050=.
|
||||
file_051=.
|
||||
file_052=.
|
||||
file_053=.
|
||||
file_054=.
|
||||
file_055=.
|
||||
file_056=.
|
||||
file_057=.
|
||||
file_058=.
|
||||
file_059=.
|
||||
[GENERATED_FILES]
|
||||
file_000=no
|
||||
file_001=no
|
||||
file_002=no
|
||||
file_003=no
|
||||
file_004=no
|
||||
file_005=no
|
||||
file_006=no
|
||||
file_007=no
|
||||
file_008=no
|
||||
file_009=no
|
||||
file_010=no
|
||||
file_011=no
|
||||
file_012=no
|
||||
file_013=no
|
||||
file_014=no
|
||||
file_015=no
|
||||
file_016=no
|
||||
file_017=no
|
||||
file_018=no
|
||||
file_019=no
|
||||
file_020=no
|
||||
file_021=no
|
||||
file_022=no
|
||||
file_023=no
|
||||
file_024=no
|
||||
file_025=no
|
||||
file_026=no
|
||||
file_027=no
|
||||
file_028=no
|
||||
file_029=no
|
||||
file_030=no
|
||||
file_031=no
|
||||
file_032=no
|
||||
file_033=no
|
||||
file_034=no
|
||||
file_035=no
|
||||
file_036=no
|
||||
file_037=no
|
||||
file_038=no
|
||||
file_039=no
|
||||
file_040=no
|
||||
file_041=no
|
||||
file_042=no
|
||||
file_043=no
|
||||
file_044=no
|
||||
file_045=no
|
||||
file_046=no
|
||||
file_047=no
|
||||
file_048=no
|
||||
file_049=no
|
||||
file_050=no
|
||||
file_051=no
|
||||
file_052=no
|
||||
file_053=no
|
||||
file_054=no
|
||||
file_055=no
|
||||
file_056=no
|
||||
file_057=no
|
||||
file_058=no
|
||||
file_059=no
|
||||
[OTHER_FILES]
|
||||
file_000=no
|
||||
file_001=no
|
||||
@@ -76,86 +205,81 @@ file_056=no
|
||||
file_057=no
|
||||
file_058=no
|
||||
file_059=no
|
||||
file_060=no
|
||||
file_061=no
|
||||
file_062=no
|
||||
file_063=no
|
||||
file_064=no
|
||||
file_065=no
|
||||
[FILE_INFO]
|
||||
file_000=C:\code\bacnet-stack\abort.c
|
||||
file_001=C:\code\bacnet-stack\apdu.c
|
||||
file_002=C:\code\bacnet-stack\bacapp.c
|
||||
file_003=C:\code\bacnet-stack\bacdcode.c
|
||||
file_004=C:\code\bacnet-stack\bacerror.c
|
||||
file_005=C:\code\bacnet-stack\bacstr.c
|
||||
file_006=C:\code\bacnet-stack\crc.c
|
||||
file_007=C:\code\bacnet-stack\dcc.c
|
||||
file_008=C:\code\bacnet-stack\iam.c
|
||||
file_009=C:\code\bacnet-stack\npdu.c
|
||||
file_010=C:\code\bacnet-stack\rd.c
|
||||
file_011=C:\code\bacnet-stack\reject.c
|
||||
file_012=C:\code\bacnet-stack\rp.c
|
||||
file_013=C:\code\bacnet-stack\whois.c
|
||||
file_014=C:\code\bacnet-stack\demo\handler\h_dcc.c
|
||||
file_015=C:\code\bacnet-stack\demo\handler\h_rd.c
|
||||
file_016=main.c
|
||||
file_017=dlmstp.c
|
||||
file_018=device.c
|
||||
file_019=rs485.c
|
||||
file_020=isr.c
|
||||
file_021=C:\code\bacnet-stack\datetime.c
|
||||
file_022=C:\code\bacnet-stack\demo\handler\txbuf.c
|
||||
file_023=C:\code\bacnet-stack\demo\handler\h_whois.c
|
||||
file_024=mstp.c
|
||||
file_025=bv.c
|
||||
file_026=ai.c
|
||||
file_027=bi.c
|
||||
file_028=av.c
|
||||
file_029=h_rp.c
|
||||
file_030=h_wp.c
|
||||
file_031=C:\code\bacnet-stack\wp.c
|
||||
file_032=C:\code\bacnet-stack\wp.h
|
||||
file_033=C:\code\bacnet-stack\abort.h
|
||||
file_034=C:\code\bacnet-stack\apdu.h
|
||||
file_035=C:\code\bacnet-stack\bacapp.h
|
||||
file_036=C:\code\bacnet-stack\bacdcode.h
|
||||
file_037=C:\code\bacnet-stack\bacdef.h
|
||||
file_038=C:\code\bacnet-stack\bacenum.h
|
||||
file_039=C:\code\bacnet-stack\bacerror.h
|
||||
file_040=C:\code\bacnet-stack\bacstr.h
|
||||
file_041=C:\code\bacnet-stack\config.h
|
||||
file_042=C:\code\bacnet-stack\crc.h
|
||||
file_043=C:\code\bacnet-stack\dcc.h
|
||||
file_044=C:\code\bacnet-stack\dlmstp.h
|
||||
file_045=C:\code\bacnet-stack\iam.h
|
||||
file_046=C:\code\bacnet-stack\npdu.h
|
||||
file_047=C:\code\bacnet-stack\rd.h
|
||||
file_048=C:\code\bacnet-stack\reject.h
|
||||
file_049=C:\code\bacnet-stack\rp.h
|
||||
file_050=C:\code\bacnet-stack\whois.h
|
||||
file_051=C:\code\bacnet-stack\demo\handler\client.h
|
||||
file_052=C:\code\bacnet-stack\demo\handler\handlers.h
|
||||
file_053=C:\code\bacnet-stack\demo\object\ai.h
|
||||
file_054=C:\code\bacnet-stack\demo\object\ao.h
|
||||
file_055=C:\code\bacnet-stack\demo\object\device.h
|
||||
file_056=stdbool.h
|
||||
file_057=stdint.h
|
||||
file_058=hardware.h
|
||||
file_059=rs485.h
|
||||
file_060=C:\code\bacnet-stack\datetime.h
|
||||
file_061=C:\code\bacnet-stack\demo\handler\txbuf.h
|
||||
file_062=mstp.h
|
||||
file_063=C:\code\bacnet-stack\datalink.h
|
||||
file_064=C:\mcc18\h\p18f6720.h
|
||||
file_065=18F6720.lkr
|
||||
file_066=C:\code\bacnet-stack\demo\handler\h_npdu.c
|
||||
file_067=C:\code\bacnet-stack\demo\handler\s_iam.c
|
||||
file_000=C:\code\bacnet-stack\src\abort.c
|
||||
file_001=C:\code\bacnet-stack\src\bacapp.c
|
||||
file_002=C:\code\bacnet-stack\src\bacdcode.c
|
||||
file_003=C:\code\bacnet-stack\src\bacerror.c
|
||||
file_004=C:\code\bacnet-stack\src\bacstr.c
|
||||
file_005=C:\code\bacnet-stack\src\crc.c
|
||||
file_006=C:\code\bacnet-stack\src\dcc.c
|
||||
file_007=C:\code\bacnet-stack\src\iam.c
|
||||
file_008=C:\code\bacnet-stack\src\rd.c
|
||||
file_009=C:\code\bacnet-stack\src\reject.c
|
||||
file_010=C:\code\bacnet-stack\src\rp.c
|
||||
file_011=C:\code\bacnet-stack\src\whois.c
|
||||
file_012=C:\code\bacnet-stack\demo\handler\h_dcc.c
|
||||
file_013=C:\code\bacnet-stack\demo\handler\h_rd.c
|
||||
file_014=main.c
|
||||
file_015=dlmstp.c
|
||||
file_016=device.c
|
||||
file_017=rs485.c
|
||||
file_018=isr.c
|
||||
file_019=C:\code\bacnet-stack\src\datetime.c
|
||||
file_020=C:\code\bacnet-stack\demo\handler\txbuf.c
|
||||
file_021=C:\code\bacnet-stack\demo\handler\h_whois.c
|
||||
file_022=mstp.c
|
||||
file_023=bv.c
|
||||
file_024=ai.c
|
||||
file_025=bi.c
|
||||
file_026=av.c
|
||||
file_027=h_rp.c
|
||||
file_028=h_wp.c
|
||||
file_029=C:\code\bacnet-stack\src\wp.c
|
||||
file_030=C:\code\bacnet-stack\demo\handler\h_npdu.c
|
||||
file_031=C:\code\bacnet-stack\demo\handler\s_iam.c
|
||||
file_032=C:\code\bacnet-stack\src\bacreal.c
|
||||
file_033=C:\code\bacnet-stack\src\bacint.c
|
||||
file_034=C:\code\bacnet-stack\src\npdu.c
|
||||
file_035=C:\code\bacnet-stack\src\version.c
|
||||
file_036=apdu.c
|
||||
file_037=C:\code\bacnet-stack\demo\handler\noserv.c
|
||||
file_038=stdbool.h
|
||||
file_039=stdint.h
|
||||
file_040=rs485.h
|
||||
file_041=mstp.h
|
||||
file_042=C:\mcc18\h\p18f6720.h
|
||||
file_043=C:\code\bacnet-stack\include\bits.h
|
||||
file_044=C:\code\bacnet-stack\include\abort.h
|
||||
file_045=C:\code\bacnet-stack\include\ai.h
|
||||
file_046=C:\code\bacnet-stack\include\apdu.h
|
||||
file_047=C:\code\bacnet-stack\include\bacaddr.h
|
||||
file_048=C:\code\bacnet-stack\include\bacapp.h
|
||||
file_049=C:\code\bacnet-stack\include\bacdcode.h
|
||||
file_050=C:\code\bacnet-stack\include\bacdef.h
|
||||
file_051=C:\code\bacnet-stack\include\bacenum.h
|
||||
file_052=C:\code\bacnet-stack\include\bacerror.h
|
||||
file_053=C:\code\bacnet-stack\include\bacint.h
|
||||
file_054=C:\code\bacnet-stack\include\bacprop.h
|
||||
file_055=C:\code\bacnet-stack\include\bacreal.h
|
||||
file_056=C:\code\bacnet-stack\include\bacstr.h
|
||||
file_057=C:\code\bacnet-stack\include\bigend.h
|
||||
file_058=C:\code\bacnet-stack\include\config.h
|
||||
file_059=18F6720.lkr
|
||||
[SUITE_INFO]
|
||||
suite_guid={5B7D72DD-9861-47BD-9F60-2BE967BF8416}
|
||||
suite_state=
|
||||
[TOOL_SETTINGS]
|
||||
TS{DD2213A8-6310-47B1-8376-9430CDFC013F}=
|
||||
TS{BFD27FBA-4A02-4C0E-A5E5-B812F3E7707C}=/m"$(BINDIR_)$(TARGETBASE).map" /o"$(TARGETBASE).cof"
|
||||
TS{C2AF05E7-1416-4625-923D-E114DB6E2B96}=-DPRINT_ENABLED=0 -DBACDL_MSTP=1 -DTSM_ENABLED=0 -DBIG_ENDIAN=0 -mL -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
|
||||
TS{C2AF05E7-1416-4625-923D-E114DB6E2B96}=-DPRINT_ENABLED=0 -DBACDL_MSTP=1 -DBIG_ENDIAN=0 -DMAX_APDU=50 -DMAX_TSM_TRANSACTIONS=0 -mL -Ls -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
|
||||
TS{ADE93A55-C7C7-4D4D-A4BA-59305F7D0391}=
|
||||
[INSTRUMENTED_TRACE]
|
||||
enable=0
|
||||
transport=0
|
||||
format=0
|
||||
[CUSTOM_BUILD]
|
||||
Pre-Build=
|
||||
Pre-BuildEnabled=1
|
||||
Post-Build=
|
||||
Post-BuildEnabled=1
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,160 @@
|
||||
/*####COPYRIGHTBEGIN####
|
||||
-------------------------------------------
|
||||
Copyright (C) 2007 Steve Karg
|
||||
|
||||
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
|
||||
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, write to:
|
||||
The Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA.
|
||||
|
||||
As a special exception, if other files instantiate templates or
|
||||
use macros or inline functions from this file, or you compile
|
||||
this file and link it with other works to produce a work based
|
||||
on this file, this file does not by itself cause the resulting
|
||||
work to be covered by the GNU General Public License. However
|
||||
the source code for this file must still be made available in
|
||||
accordance with section (3) of the GNU General Public License.
|
||||
|
||||
This exception does not invalidate any other reasons why a work
|
||||
based on this file might be covered by the GNU General Public
|
||||
License.
|
||||
-------------------------------------------
|
||||
####COPYRIGHTEND####*/
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bits.h"
|
||||
#include "apdu.h"
|
||||
#include "bacdef.h"
|
||||
#include "bacdcode.h"
|
||||
#include "bacenum.h"
|
||||
#include "handlers.h"
|
||||
|
||||
uint16_t apdu_timeout(
|
||||
void)
|
||||
{
|
||||
return 3000;
|
||||
}
|
||||
|
||||
uint8_t apdu_retries(
|
||||
void)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
bool apdu_service_supported(
|
||||
BACNET_SERVICES_SUPPORTED service_supported)
|
||||
{
|
||||
bool status = false;
|
||||
|
||||
switch (service_supported) {
|
||||
case SERVICE_SUPPORTED_READ_PROPERTY:
|
||||
case SERVICE_SUPPORTED_WHO_IS:
|
||||
case SERVICE_CONFIRMED_REINITIALIZE_DEVICE:
|
||||
case SERVICE_SUPPORTED_WRITE_PROPERTY:
|
||||
case SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL:
|
||||
status = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
uint16_t apdu_decode_confirmed_service_request(
|
||||
uint8_t * apdu, /* APDU data */
|
||||
uint16_t apdu_len,
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data,
|
||||
uint8_t * service_choice,
|
||||
uint8_t ** service_request,
|
||||
uint16_t * service_request_len)
|
||||
{
|
||||
uint16_t len = 0; /* counts where we are in PDU */
|
||||
|
||||
service_data->segmented_message = (apdu[0] & BIT3) ? true : false;
|
||||
service_data->more_follows = (apdu[0] & BIT2) ? true : false;
|
||||
service_data->segmented_response_accepted =
|
||||
(apdu[0] & BIT1) ? true : false;
|
||||
service_data->max_segs = decode_max_segs(apdu[1]);
|
||||
service_data->max_resp = decode_max_apdu(apdu[1]);
|
||||
service_data->invoke_id = apdu[2];
|
||||
len = 3;
|
||||
if (service_data->segmented_message) {
|
||||
service_data->sequence_number = apdu[len++];
|
||||
service_data->proposed_window_number = apdu[len++];
|
||||
}
|
||||
*service_choice = apdu[len++];
|
||||
*service_request = &apdu[len];
|
||||
*service_request_len = apdu_len - len;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
void apdu_handler(
|
||||
BACNET_ADDRESS * src,
|
||||
uint8_t * apdu, /* APDU data */
|
||||
uint16_t apdu_len)
|
||||
{
|
||||
BACNET_CONFIRMED_SERVICE_DATA service_data = { 0 };
|
||||
uint8_t service_choice = 0;
|
||||
uint8_t *service_request = NULL;
|
||||
uint16_t service_request_len = 0;
|
||||
uint16_t len = 0; /* counts where we are in PDU */
|
||||
|
||||
if (apdu) {
|
||||
/* PDU Type */
|
||||
switch (apdu[0] & 0xF0) {
|
||||
case PDU_TYPE_CONFIRMED_SERVICE_REQUEST:
|
||||
len = apdu_decode_confirmed_service_request(&apdu[0], /* APDU data */
|
||||
apdu_len, &service_data, &service_choice, &service_request,
|
||||
&service_request_len);
|
||||
if (service_choice == SERVICE_CONFIRMED_READ_PROPERTY) {
|
||||
handler_read_property(service_request, service_request_len,
|
||||
src, &service_data);
|
||||
}
|
||||
else if (service_choice == SERVICE_CONFIRMED_WRITE_PROPERTY) {
|
||||
handler_write_property(service_request,
|
||||
service_request_len, src, &service_data);
|
||||
} else if (service_choice == SERVICE_CONFIRMED_REINITIALIZE_DEVICE) {
|
||||
handler_reinitialize_device(service_request,
|
||||
service_request_len, src, &service_data);
|
||||
} else if (service_choice == SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL) {
|
||||
handler_device_communication_control(service_request,
|
||||
service_request_len, src, &service_data);
|
||||
} else {
|
||||
handler_unrecognized_service(service_request,
|
||||
service_request_len, src, &service_data);
|
||||
}
|
||||
break;
|
||||
case PDU_TYPE_UNCONFIRMED_SERVICE_REQUEST:
|
||||
service_choice = apdu[1];
|
||||
service_request = &apdu[2];
|
||||
service_request_len = apdu_len - 2;
|
||||
if (service_choice == SERVICE_UNCONFIRMED_WHO_IS) {
|
||||
handler_who_is(service_request, service_request_len, src);
|
||||
}
|
||||
break;
|
||||
case PDU_TYPE_SIMPLE_ACK:
|
||||
case PDU_TYPE_COMPLEX_ACK:
|
||||
case PDU_TYPE_SEGMENT_ACK:
|
||||
case PDU_TYPE_ERROR:
|
||||
case PDU_TYPE_REJECT:
|
||||
case PDU_TYPE_ABORT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "dlmstp.h"
|
||||
#include "rs485.h"
|
||||
#include "npdu.h"
|
||||
#include "handlers.h"
|
||||
|
||||
/* Number of MS/TP Packets Rx/Tx */
|
||||
uint16_t MSTP_Packets = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "datalink.h"
|
||||
#include "dcc.h"
|
||||
#include "handlers.h"
|
||||
#include "iam.h"
|
||||
#include "client.h"
|
||||
#include "txbuf.h"
|
||||
|
||||
/* chip configuration data */
|
||||
@@ -92,30 +92,6 @@
|
||||
volatile uint8_t Milliseconds = 0;
|
||||
volatile uint8_t Zero_Cross_Timeout = 0;
|
||||
|
||||
static void BACnet_Service_Handlers_Init(
|
||||
void)
|
||||
{
|
||||
/* we need to handle who-is to support dynamic device binding */
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_WHO_IS, handler_who_is);
|
||||
/* Set the handlers for any confirmed services that we support. */
|
||||
/* We must implement read property - it's required! */
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_READ_PROPERTY,
|
||||
handler_read_property);
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_REINITIALIZE_DEVICE,
|
||||
handler_reinitialize_device);
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_WRITE_PROPERTY,
|
||||
handler_write_property);
|
||||
#if 0
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_UTC_TIME_SYNCHRONIZATION,
|
||||
handler_timesync_utc);
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_TIME_SYNCHRONIZATION,
|
||||
handler_timesync);
|
||||
#endif
|
||||
/* handle communication so we can shutup when asked */
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL,
|
||||
handler_device_communication_control);
|
||||
}
|
||||
|
||||
void Reinitialize(
|
||||
void)
|
||||
{
|
||||
@@ -255,7 +231,6 @@ void Initialize_Variables(
|
||||
ENABLE_TIMER4_INT();
|
||||
/* interrupts must be enabled before we read our inputs */
|
||||
Global_Int(INT_ENABLED);
|
||||
BACnet_Service_Handlers_Init();
|
||||
dlmstp_init();
|
||||
/* Start our time from now */
|
||||
Milliseconds = 0;
|
||||
|
||||
Reference in New Issue
Block a user