samv7 adc and tone_alarm move to cdev lib

This commit is contained in:
Daniel Agar 2018-08-27 13:21:56 -04:00 committed by Beat Küng
parent 1e7197976d
commit d0d1967a65
2 changed files with 7 additions and 7 deletions

View File

@ -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),

View File

@ -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) {