2019-06-19 03:31 AM
I am facing difficulty while getting hands on SPC5 Studio.
2019-06-24 02:27 AM
#include "components.h"
#define PIN_Out2 116
#define PIN_Out1 117
void blink_delay(int n);
/*
* Application entry point.
*/
int main(void) {
/* Initialization of all the imported components in the order specified in
the application wizard. The function is generated automatically.*/
componentsInit();
/* Application main loop.*/
for ( ; ; ) {
pal_setpad(PORT_C, PIN_Out1);
pal_setpad(PORT_C, PIN_Out2);
blink_delay(500);
pal_clearpad(PORT_C, PIN_Out1);
pal_clearpad(PORT_C, PIN_Out2);
blink_delay(500);
pal_setpad(PORT_C, PIN_Out1);
pal_setpad(PORT_C, PIN_Out2);*/
pal_togglepad(PORT_C, PIN_Out1);
pal_togglepad(PORT_C, PIN_Out2);
}
}
void blink_delay(int n) {
int i,j;
for(i=0; i<n; i++) {
for(j=0; j<100; j++) {
;
}
}
}
What is wrong in this code?