|
|
|
|
@ -26,6 +26,11 @@ void baz() {
|
|
|
|
|
* amp 0 is on muxer channel 2
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define MUXER_CHANNEL_0 2
|
|
|
|
|
#define MUXER_CHANNEL_1 0
|
|
|
|
|
#define MUXER_CHANNEL_2 1
|
|
|
|
|
#define MUXER_CHANNEL_3 3
|
|
|
|
|
|
|
|
|
|
void hardinit() {
|
|
|
|
|
/* initializes the hardware */
|
|
|
|
|
|
|
|
|
|
@ -60,20 +65,22 @@ void softinit() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int __attribute__((noreturn)) main(void) {
|
|
|
|
|
temperatures[2]=1;
|
|
|
|
|
hardinit();
|
|
|
|
|
temperatures[2]=10;
|
|
|
|
|
softinit();
|
|
|
|
|
|
|
|
|
|
muxer_set(2);
|
|
|
|
|
muxer_set(MUXER_CHANNEL_0);
|
|
|
|
|
temperatures[2]=33;
|
|
|
|
|
|
|
|
|
|
for(;;){
|
|
|
|
|
|
|
|
|
|
SOFTTIMER(1,500) {
|
|
|
|
|
// for(int i=0; i < 4; i++) {
|
|
|
|
|
// muxer_set(i);
|
|
|
|
|
// if(mcpadc_has_new_data()) {
|
|
|
|
|
// temperatures[i] = mpcadc_get_data();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
SOFTTIMER(1,100) {
|
|
|
|
|
if(mcpadc_has_new_data()) {
|
|
|
|
|
temperatures[0] = mcpadc_get_data();
|
|
|
|
|
temperatures[2]++;
|
|
|
|
|
}
|
|
|
|
|
temperatures[1] = 22;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|