//------------------------------------------- // Entry point for the application //------------------------------------------- void appMain(void) { SENSOR_POWER_ON(); hplAdcUseSupplyRef(); // use Supply power as voltage reference beeperInit(); uint16_t y; // y-axis accelerometer reading while(1) { y = adcRead(ACC_Y_PORT); if (y < Y_NOTE1) { beeperBeepEx(10, NOTE1_FREQ); } else if (y > Y_NOTE2) { beeperBeepEx(10, NOTE2_FREQ); } // PRINTF("X= %u Y= %u Z= %u\n", x, y, z); } }
//------------------------------------------- // Entry point for the application //------------------------------------------- void appMain(void) { uint16_t i; // beeperBeep(1000); // mdelay(100); // beeperBeepEx(1000, 500); // mdelay(100); // for (i = 0; i < 100; ++i) { // beeperToggle(); // udelay(100); // } beeperBeepEx(1000, 20000); mdelay(1000); beeperBeepEx(1000, 10000); mdelay(1000); beeperBeepEx(1000, 1000); mdelay(1000); beeperBeepEx(1000, 500); mdelay(1000); beeperBeepEx(1000, 100); mdelay(1000); beeperBeepEx(1000, 50); }