comparison projects/samples/main.cpp @ 15:901d205d1a3c

Updated to latest PRU library; external PRU file no longer needed. Also catch SIGTERM as well as SIGINT to clean up gracefully.
author andrewm
date Sat, 07 Feb 2015 16:41:56 +0000
parents 08246efd51da
children a6d223473ea2
comparison
equal deleted inserted replaced
14:06f93bef7dd2 15:901d205d1a3c
156 if(BeagleRT_startAudio()) { 156 if(BeagleRT_startAudio()) {
157 cout << "Error: unable to start real-time audio" << endl; 157 cout << "Error: unable to start real-time audio" << endl;
158 return -1; 158 return -1;
159 } 159 }
160 160
161 // Set up interrupt handler to catch Control-C 161 // Set up interrupt handler to catch Control-C and SIGTERM
162 signal(SIGINT, interrupt_handler); 162 signal(SIGINT, interrupt_handler);
163 signal(SIGTERM, interrupt_handler);
163 164
164 // Run until told to stop 165 // Run until told to stop
165 while(!gShouldStop) { 166 while(!gShouldStop) {
166 usleep(100000); 167 usleep(100000);
167 } 168 }