Updated IAR project files for BDK port on AVR. Added main loop I/O toggle to monitor timing.

This commit is contained in:
skarg
2010-12-11 21:40:13 +00:00
parent 4ef20d370a
commit fc9be7814e
4 changed files with 65 additions and 6 deletions
+5 -5
View File
@@ -1054,7 +1054,7 @@
</option>
<option>
<name>SCCStackSize</name>
<state>0x200</state>
<state>0x400</state>
</option>
<option>
<name>SCExtCStack</name>
@@ -1240,7 +1240,7 @@
<name>CCDefines</name>
<state>NDEBUG</state>
<state>BACDL_MSTP</state>
<state>MAX_APDU=256</state>
<state>MAX_APDU=128</state>
<state>BIG_ENDIAN=0</state>
<state>MAX_TSM_TRANSACTIONS=0</state>
<state>BACAPP_BOOLEAN</state>
@@ -1357,7 +1357,7 @@
</option>
<option>
<name>CCDebugInfo</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>CCNoErrorMsg</name>
@@ -1706,7 +1706,7 @@
</option>
<option>
<name>OutputFile</name>
<state>bacnet.a90</state>
<state>bacnet.d90</state>
</option>
<option>
<name>OutputFormat</name>
@@ -1864,7 +1864,7 @@
</option>
<option>
<name>DebugInformation</name>
<state>1</state>
<state>0</state>
</option>
<option>
<name>RuntimeControl</name>
+6
View File
@@ -50,6 +50,12 @@ int main(
void)
{
init();
/* Configure the watchdog timer - Disabled for debugging */
#ifdef NDEBUG
watchdog_init(2000);
#else
watchdog_init(0);
#endif
timer_init();
adc_init();
input_init();
+47
View File
@@ -49,6 +49,52 @@ void test_init(
serial_baud_rate_set(9600);
#endif
timer_interval_start_seconds(&Test_Timer, 1);
/* configure a port pin as output */
BIT_SET(DDRB, DDB0);
}
/*************************************************************************
* Description: Turn on a pin
* Returns: none
* Notes: none
*************************************************************************/
static inline void test_pin_on(void)
{
BIT_SET(PORTB, PB0);
}
/*************************************************************************
* Description: Turn off a pin
* Returns: none
* Notes: none
*************************************************************************/
static inline void test_pin_off(void)
{
BIT_CLEAR(PORTB, PB0);
}
/*************************************************************************
* Description: Get the state of the test pin
* Returns: true if on, false if off.
* Notes: none
*************************************************************************/
static inline bool test_pin_state(void)
{
return (BIT_CHECK(PINB, PB0));
}
/*************************************************************************
* Description: Toggle the test pin
* Returns: none
* Notes: none
*************************************************************************/
static inline void test_pin_toggle(void)
{
if (test_pin_state()) {
test_pin_off();
} else {
test_pin_on();
}
}
#ifdef MSTP_MONITOR
@@ -124,5 +170,6 @@ void test_task(
serial_byte_send('\n');
serial_byte_transmit_complete();
}
test_pin_toggle();
}
#endif