#include <avr/io.h> #include <avr/interrupt.h> #define __delay_cycles(n) __builtin_avr_delay_cycles(n) #define __enable_interrupt() sei() #include "touch_api.h" #include "touch.h" /*---------------------------------------------------------------------------- manifest constants ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- macros ----------------------------------------------------------------------------*/ #define GET_SENSOR_STATE(SENSOR_NUMBER) qt_measure_data.qt_touch_status.sensor_states[(SENSOR_NUMBER/8)] & (1 << (SENSOR_NUMBER % 8)) #define GET_ROTOR_SLIDER_POSITION(ROTOR_SLIDER_NUMBER) qt_measure_data.qt_touch_status.rotor_slider_values[ROTOR_SLIDER_NUMBER] /*---------------------------------------------------------------------------- type definitions ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- prototypes ----------------------------------------------------------------------------*/ extern void touch_measure(void); extern void touch_init( void ); extern void init_system( void ); extern void init_timer_isr(void); extern void set_timer_period(uint16_t); /*---------------------------------------------------------------------------- Structure Declarations ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- macros ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- global variables ----------------------------------------------------------------------------*/ /* Timer period in msec. */ uint16_t qt_measurement_period_msec = QT_MEASUREMENT_PERIOD_MS; uint16_t time_ms_inc=0; /*---------------------------------------------------------------------------- extern variables ----------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------- static variables ----------------------------------------------------------------------------*/ /* flag set by timer ISR when it's time to measure touch */ volatile uint8_t time_to_measure_touch = 0u; /* current time, set by timer ISR */ volatile uint16_t current_time_ms_touch = 0u; /*============================================================================ Name : main ------------------------------------------------------------------------------ Purpose : main code entry point Input : n/a Output : n/a Notes : ============================================================================*/ int main( void ) { /* initialise host app, pins, watchdog, etc */ init_system(); /* configure timer ISR to fire regularly */ init_timer_isr(); /* Initialize Touch sensors */ touch_init(); /* enable interrupts */ __enable_interrupt(); /* loop forever */ for( ; ; ) { touch_measure(); /* Time Non-critical host application code goes here */ } }
this is the code i want to make selfcap qtouch but when building the project it gives me a error given below ......
Error recipe for target 'main.o' failed Error recipe for target 'touch.o' failed Error touch_api_ptc.h: No such file or directory Error touch_api_ptc.h: No such file or directory
it would be appreciable if you can help me....