Skip to content
Snippets Groups Projects
Commit d0d1967a authored by Daniel Agar's avatar Daniel Agar Committed by Beat Küng
Browse files

samv7 adc and tone_alarm move to cdev lib

parent 1e719797
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@
# define rCCR REG(STM32_ADC_CCR_OFFSET)
#endif
class ADC : public device::CDev
class ADC : public cdev::CDev
{
public:
ADC(uint32_t channels);
......@@ -145,7 +145,7 @@ private:
};
ADC::ADC(uint32_t channels) :
CDev("adc", ADC0_DEVICE_PATH),
CDev(ADC0_DEVICE_PATH),
_sample_perf(perf_alloc(PC_ELAPSED, "adc_samples")),
_channel_count(0),
_samples(nullptr),
......
......@@ -208,7 +208,7 @@
#define CBRK_BUZZER_KEY 782097
class ToneAlarm : public device::CDev
class ToneAlarm : public cdev::CDev
{
public:
ToneAlarm();
......@@ -313,7 +313,7 @@ extern "C" __EXPORT int tone_alarm_main(int argc, char *argv[]);
ToneAlarm::ToneAlarm() :
CDev("tone_alarm", TONEALARM0_DEVICE_PATH),
CDev(TONEALARM0_DEVICE_PATH),
_default_tune_number(0),
_user_tune(nullptr),
_tune(nullptr),
......@@ -393,7 +393,7 @@ ToneAlarm::init()
/* make sure the timer is running */
rCR1 = GTIM_CR1_CEN;
#endif
DEVICE_DEBUG("ready");
return OK;
}
......@@ -803,14 +803,14 @@ ToneAlarm::ioctl(file *filp, int cmd, unsigned long arg)
{
int result = OK;
DEVICE_DEBUG("ioctl %i %u", cmd, arg);
PX4_DEBUG("ioctl %i %u", cmd, arg);
// irqstate_t flags = enter_critical_section();
/* decide whether to increase the alarm level to cmd or leave it alone */
switch (cmd) {
case TONE_SET_ALARM:
DEVICE_DEBUG("TONE_SET_ALARM %u", arg);
PX4_DEBUG("TONE_SET_ALARM %u", arg);
if (arg < TONE_NUMBER_OF_TUNES) {
if (arg == TONE_STOP_TUNE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment