Society of Robots - Robot Forum
Software => Software => Topic started by: chelmi on March 27, 2010, 12:55:06 PM
-
Hi guys,
I want to separate my code in several modules and I can't find a way to do that without upsetting the linker :p
Here is my configuration:
- main.c file which include <sys/atmega168.h> to initialize basic stuff like a status LED. It defines the appInit*
and appControl functions.
- scanner.c that defines functions to initialize a servo and a distance sensor. These function are called by the appInit* functions in
main.c
Which file should I include in scanner.c to hat the port definition? (like D0, D1...)
Chelmi.
-
Easiest is to use a 'scanner.h' rather than a 'scanner.c'
For ease of use, to newbs, the lib expects one C file.