You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
963 B
43 lines
963 B
//------------------------------------------------------------------------------
|
|
// File to configure device
|
|
#include "config.h" // <-------Look here first!----------------------
|
|
|
|
#include <avr/io.h>
|
|
#include <avr/wdt.h>
|
|
#include <stdio.h>
|
|
#include "IdiBusSlave.h"
|
|
#include "RSLink.h"
|
|
#include "IdiBusSlave.h"
|
|
|
|
#ifdef _NO_BOOTLOADER_
|
|
FUSES=
|
|
{
|
|
.extended=0xFC,
|
|
.high = 0x01,
|
|
.low = 0xE0
|
|
}; // Fuses + Lock programming
|
|
LOCKBITS=0xFF;
|
|
#endif
|
|
|
|
|
|
extern void IdiBusSlaveInit(void);
|
|
//##############################################################################
|
|
int main(void)
|
|
{
|
|
cli(); // INTR OFF
|
|
// Enable wdt
|
|
wdt_enable(WDTO_2S);
|
|
wdt_reset();
|
|
IdiBusSlaveInit(); // See idibus_custom.c file
|
|
sei(); // INTR ON
|
|
SlaveInit();
|
|
wdt_reset();
|
|
//Init done!
|
|
while (1)
|
|
{
|
|
SlaveLoop();
|
|
RSLink_Handler();
|
|
wdt_reset();
|
|
}
|
|
}
|
|
//##############################################################################
|