Browse Source

Update lpc176x framework version requirement (#15868)

Chris Pepper 5 years ago
parent
commit
86d0bc1af5
No account linked to committer's email address

+ 2
- 3
Marlin/src/HAL/HAL_LPC1768/HAL.h View File

131
                                     // K = 6, 565 samples, 500Hz sample rate, 1.13s convergence on full range step
131
                                     // K = 6, 565 samples, 500Hz sample rate, 1.13s convergence on full range step
132
                                     // Memory usage per ADC channel (bytes): 4 (32 Bytes for 8 channels)
132
                                     // Memory usage per ADC channel (bytes): 4 (32 Bytes for 8 channels)
133
 
133
 
134
-#define HAL_ADC_RESULT_BITS    12   // 15 bit maximum, raw temperature is stored as int16_t
134
+#define HAL_ADC_RESOLUTION     12   // 15 bit maximum, raw temperature is stored as int16_t
135
 #define HAL_ADC_FILTERED            // Disable oversampling done in Marlin as ADC values already filtered in HAL
135
 #define HAL_ADC_FILTERED            // Disable oversampling done in Marlin as ADC values already filtered in HAL
136
-#define HAL_ADC_RESOLUTION     HAL_ADC_RESULT_BITS
137
 
136
 
138
 using FilteredADC = LPC176x::ADC<ADC_LOWPASS_K_VALUE, ADC_MEDIAN_FILTER_SIZE>;
137
 using FilteredADC = LPC176x::ADC<ADC_LOWPASS_K_VALUE, ADC_MEDIAN_FILTER_SIZE>;
139
 extern uint32_t HAL_adc_reading;
138
 extern uint32_t HAL_adc_reading;
140
 [[gnu::always_inline]] inline void HAL_start_adc(const pin_t pin) {
139
 [[gnu::always_inline]] inline void HAL_start_adc(const pin_t pin) {
141
-  HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESULT_BITS); // returns 16bit value, reduce to required bits
140
+  HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
142
 }
141
 }
143
 [[gnu::always_inline]] inline uint16_t HAL_read_adc() {
142
 [[gnu::always_inline]] inline uint16_t HAL_read_adc() {
144
   return HAL_adc_reading;
143
   return HAL_adc_reading;

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/inc/SanityCheck.h View File

24
 #if PIO_PLATFORM_VERSION < 000001000
24
 #if PIO_PLATFORM_VERSION < 000001000
25
   #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
25
   #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
26
 #endif
26
 #endif
27
-#if PIO_FRAMEWORK_VERSION < 000002000
27
+#if PIO_FRAMEWORK_VERSION < 000002001
28
   #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
28
   #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
29
 #endif
29
 #endif
30
 
30
 

Loading…
Cancel
Save