Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
b9dad0ad
Commit
b9dad0ad
authored
Mar 09, 2023
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32: Remove commented-out printf's and debugging code.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
7c1584ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
55 deletions
+0
-55
ports/stm32/gccollect.c
ports/stm32/gccollect.c
+0
-21
ports/stm32/led.c
ports/stm32/led.c
+0
-1
ports/stm32/rtc.c
ports/stm32/rtc.c
+0
-5
ports/stm32/storage.c
ports/stm32/storage.c
+0
-5
ports/stm32/usbdev/class/src/usbd_cdc_msc_hid.c
ports/stm32/usbdev/class/src/usbd_cdc_msc_hid.c
+0
-17
ports/stm32/usbdev/class/src/usbd_msc_scsi.c
ports/stm32/usbdev/class/src/usbd_msc_scsi.c
+0
-6
No files found.
ports/stm32/gccollect.c
View file @
b9dad0ad
...
...
@@ -24,23 +24,13 @@
* THE SOFTWARE.
*/
#include <stdio.h>
#include <stdint.h>
#include "py/mpstate.h"
#include "py/gc.h"
#include "py/mpthread.h"
#include "shared/runtime/gchelper.h"
#include "shared/runtime/softtimer.h"
#include "gccollect.h"
#include "systick.h"
void
gc_collect
(
void
)
{
// get current time, in case we want to time the GC
#if 0
uint32_t start = mp_hal_ticks_us();
#endif
// start the GC
gc_collect_start
();
...
...
@@ -57,15 +47,4 @@ void gc_collect(void) {
// end the GC
gc_collect_end
();
#if 0
// print GC info
uint32_t ticks = mp_hal_ticks_us() - start;
gc_info_t info;
gc_info(&info);
printf("GC@%lu %lums\n", start, ticks);
printf(" " UINT_FMT " total\n", info.total);
printf(" " UINT_FMT " : " UINT_FMT "\n", info.used, info.free);
printf(" 1=" UINT_FMT " 2=" UINT_FMT " m=" UINT_FMT "\n", info.num_1block, info.num_2block, info.max_block);
#endif
}
ports/stm32/led.c
View file @
b9dad0ad
...
...
@@ -212,7 +212,6 @@ void led_state(pyb_led_t led, int state) {
}
const
pin_obj_t
*
led_pin
=
pyb_led_obj
[
led
-
1
].
led_pin
;
// printf("led_state(%d,%d)\n", led, state);
if
(
state
==
0
)
{
// turn LED off
MICROPY_HW_LED_OFF
(
led_pin
);
...
...
ports/stm32/rtc.c
View file @
b9dad0ad
...
...
@@ -24,8 +24,6 @@
* THE SOFTWARE.
*/
#include <stdio.h>
#include "py/runtime.h"
#include "shared/timeutils/timeutils.h"
#include "extint.h"
...
...
@@ -771,8 +769,6 @@ mp_obj_t pyb_rtc_wakeup(size_t n_args, const mp_obj_t *args) {
NVIC_SetPriority
(
RTC_WKUP_IRQn
,
IRQ_PRI_RTC_WKUP
);
HAL_NVIC_EnableIRQ
(
RTC_WKUP_IRQn
);
// printf("wut=%d wucksel=%d\n", wut, wucksel);
}
else
{
// clear WUTIE to disable interrupts
RTC
->
CR
&=
~
RTC_CR_WUTIE
;
...
...
@@ -833,7 +829,6 @@ mp_obj_t pyb_rtc_calibration(size_t n_args, const mp_obj_t *args) {
HAL_RTCEx_SetSmoothCalib
(
&
RTCHandle
,
RTC_SMOOTHCALIB_PERIOD_32SEC
,
cal_p
,
cal_m
);
return
mp_const_none
;
}
else
{
// printf("CALR = 0x%x\n", (mp_uint_t) RTCHandle.Instance->CALR); // DEBUG
// Test if CALP bit is set in CALR:
if
(
RTCHandle
.
Instance
->
CALR
&
0x8000
)
{
cal
=
512
-
(
RTCHandle
.
Instance
->
CALR
&
0x1ff
);
...
...
ports/stm32/storage.c
View file @
b9dad0ad
...
...
@@ -24,9 +24,6 @@
* THE SOFTWARE.
*/
#include <stdint.h>
#include <string.h>
#include "py/runtime.h"
#include "py/mperrno.h"
#include "extmod/vfs_fat.h"
...
...
@@ -144,7 +141,6 @@ static void build_partition(uint8_t *buf, int boot, int type, uint32_t start_blo
}
bool
storage_read_block
(
uint8_t
*
dest
,
uint32_t
block
)
{
// printf("RD %u\n", block);
if
(
block
==
0
)
{
// fake the MBR so we can decide on our own partition table
...
...
@@ -176,7 +172,6 @@ bool storage_read_block(uint8_t *dest, uint32_t block) {
}
bool
storage_write_block
(
const
uint8_t
*
src
,
uint32_t
block
)
{
// printf("WR %u\n", block);
if
(
block
==
0
)
{
// can't write MBR, but pretend we did
return
true
;
...
...
ports/stm32/usbdev/class/src/usbd_cdc_msc_hid.c
View file @
b9dad0ad
...
...
@@ -821,23 +821,6 @@ static uint8_t USBD_CDC_MSC_HID_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
}
static
uint8_t
USBD_CDC_MSC_HID_Setup
(
USBD_HandleTypeDef
*
pdev
,
USBD_SetupReqTypedef
*
req
)
{
/*
printf("SU: %x %x %x %x\n", req->bmRequest, req->bRequest, req->wValue, req->wIndex);
This is what we get when MSC is IFACE=0 and CDC is IFACE=1,2:
SU: 21 22 0 1 -- USB_REQ_TYPE_CLASS | USB_REQ_RECIPIENT_INTERFACE; CDC_SET_CONTROL_LINE_STATE
SU: 21 20 0 1 -- USB_REQ_TYPE_CLASS | USB_REQ_RECIPIENT_INTERFACE; CDC_SET_LINE_CODING
SU: a1 fe 0 0 -- 0x80 | USB_REQ_TYPE_CLASS | USB_REQ_RECIPIENT_INTERFACE; BOT_GET_MAX_LUN; 0; 0
SU: 21 22 3 1 -- USB_REQ_TYPE_CLASS | USB_REQ_RECIPIENT_INTERFACE; CDC_SET_CONTROL_LINE_STATE
On a Mac OS X, with MSC then CDC:
SU: a1 fe 0 0
SU: 21 22 2 1
SU: 21 22 3 1
SU: 21 20 0 1
*/
usbd_cdc_msc_hid_state_t
*
usbd
=
pdev
->
pClassData
;
// Work out the recipient of the setup request
...
...
ports/stm32/usbdev/class/src/usbd_msc_scsi.c
View file @
b9dad0ad
...
...
@@ -123,12 +123,6 @@ int8_t SCSI_ProcessCmd(USBD_HandleTypeDef *pdev,
uint8_t
lun
,
uint8_t
*
params
)
{
/*
if (params[0] != SCSI_READ10 && params[0] != SCSI_WRITE10) {
printf("SCSI_ProcessCmd(lun=%d, params=%x, %x)\n", lun, params[0], params[1]);
}
*/
switch
(
params
[
0
])
{
case
SCSI_TEST_UNIT_READY
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment