mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
drivers/stm32 cleanup unnecessary Device CDev usage
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
class ADC : public device::CDev
|
||||
class ADC : public cdev::CDev
|
||||
{
|
||||
public:
|
||||
ADC(uint32_t channels);
|
||||
@@ -165,7 +165,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),
|
||||
@@ -288,7 +288,7 @@ ADC::init()
|
||||
int rv = board_adc_init();
|
||||
|
||||
if (rv < 0) {
|
||||
DEVICE_LOG("sample timeout");
|
||||
PX4_DEBUG("sample timeout");
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ ADC::_sample(unsigned channel)
|
||||
uint16_t result = board_adc_sample(channel);
|
||||
|
||||
if (result == 0xffff) {
|
||||
DEVICE_LOG("sample timeout");
|
||||
PX4_ERR("sample timeout");
|
||||
}
|
||||
|
||||
perf_end(_sample_perf);
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
|
||||
#define CBRK_BUZZER_KEY 782097
|
||||
|
||||
class ToneAlarm : public device::CDev
|
||||
class ToneAlarm : public cdev::CDev
|
||||
{
|
||||
public:
|
||||
ToneAlarm();
|
||||
@@ -361,7 +361,7 @@ extern "C" __EXPORT int tone_alarm_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
ToneAlarm::ToneAlarm() :
|
||||
CDev("tone_alarm", TONEALARM0_DEVICE_PATH),
|
||||
CDev(TONEALARM0_DEVICE_PATH),
|
||||
_running(false),
|
||||
_should_run(true),
|
||||
_play_tone(false),
|
||||
@@ -429,7 +429,7 @@ int ToneAlarm::init()
|
||||
/* make sure the timer is running */
|
||||
rCR1 = GTIM_CR1_CEN;
|
||||
|
||||
DEVICE_DEBUG("ready");
|
||||
PX4_DEBUG("ready");
|
||||
|
||||
_running = true;
|
||||
work_queue(HPWORK, &_work, (worker_t)&ToneAlarm::next_trampoline, this, 0);
|
||||
|
||||
Reference in New Issue
Block a user