Selaa lähdekoodia

Some `MIN`/`MAX` rely on core

Scott Lahteine 4 vuotta sitten
vanhempi
commit
253d0f9671

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c Näytä tiedosto

@@ -1904,7 +1904,7 @@ static void udd_ep_in_sent(udd_ep_id_t ep)
1904 1904
 		ptr_src = &ptr_job->buf[ptr_job->buf_cnt];
1905 1905
 		nb_remain = ptr_job->buf_size - ptr_job->buf_cnt;
1906 1906
 		// Fill a bank even if no data (ZLP)
1907
-		nb_data = _MIN(nb_remain, pkt_size);
1907
+		nb_data = MIN(nb_remain, pkt_size);
1908 1908
 		// Modify job information
1909 1909
 		ptr_job->buf_cnt += nb_data;
1910 1910
 		ptr_job->buf_load = nb_data;

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h Näytä tiedosto

@@ -291,7 +291,7 @@ extern "C" {
291 291
   //! available greater size, then applies register format of UOTGHS controller
292 292
   //! for endpoint size bit-field.
293 293
 #undef udd_format_endpoint_size
294
-#define udd_format_endpoint_size(size)            (32 - clz(((uint32_t)_MIN(_MAX(size, 8), 1024) << 1) - 1) - 1 - 3)
294
+#define udd_format_endpoint_size(size)            (32 - clz(((uint32_t)MIN(MAX(size, 8), 1024) << 1) - 1) - 1 - 3)
295 295
   //! Configures the selected endpoint size
296 296
 #define udd_configure_endpoint_size(ep, size)     (Wr_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTCFG[0], ep), UOTGHS_DEVEPTCFG_EPSIZE_Msk, udd_format_endpoint_size(size)))
297 297
   //! Gets the configured selected endpoint size

Loading…
Peruuta
Tallenna