stm32: Remove commented-out printf's and debugging code.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
7c1584aef1
commit
b9dad0add2
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue