Skip to content

Commit e66170e

Browse files
committed
Update for change in Marlins HAL interface
1 parent 9f21b26 commit e66170e

File tree

1 file changed

+8
-10
lines changed
  • src/MarlinSimulator/marlin_hal_impl

1 file changed

+8
-10
lines changed

src/MarlinSimulator/marlin_hal_impl/HAL.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,35 +48,33 @@ int freeMemory() {
4848
// ADC
4949
// ------------------------
5050

51-
void HAL_adc_init() {
51+
void MarlinHAL::adc_init() {
5252

5353
}
5454

55-
void HAL_adc_enable_channel(const uint8_t ch) {
55+
void MarlinHAL::adc_enable(const uint8_t ch) {
5656

5757
}
5858

59-
uint8_t active_ch = 0;
60-
void HAL_adc_start_conversion(const uint8_t ch) {
59+
uint8_t MarlinHAL::active_ch = 0;
60+
void MarlinHAL::adc_start(const uint8_t ch) {
6161
active_ch = ch;
6262
}
6363

64-
bool HAL_adc_finished() {
64+
bool MarlinHAL::adc_ready() {
6565
return true;
6666
}
6767

68-
uint16_t HAL_adc_get_result() {
68+
uint16_t MarlinHAL::adc_value() {
6969
pin_t pin = analogInputToDigitalPin(active_ch);
7070
if (!VALID_PIN(pin)) return 0;
7171
uint16_t data = ((Gpio::get(pin) >> 2) & 0x3FF);
7272
return data; // return 10bit value as Marlin expects
7373
}
7474

75-
void HAL_pwm_init() {
75+
void MarlinHAL::reboot() { /* Reset the application state and GPIO */ }
7676

77-
}
78-
79-
void HAL_reboot() { /* Reset the application state and GPIO */ }
77+
void MarlinHAL::idletask() {}
8078

8179
// Maple Compatibility
8280
volatile uint32_t systick_uptime_millis = 0;

0 commit comments

Comments
 (0)