mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
80c9ef7b89
Used esp-rom tag esp32s3-20210327 and did manual cleanup. Rename s_usb_osglue to rom_usb_osglue like it was done for esp32s2. Some comments in esp32s2 headers are synced from esp32s3.
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// USB persistence flags.
|
|
|
|
//This bit indicates persistence has been enabled, that is, the USB initialization routines should not
|
|
//reset the USB device as the device still is initialized and the host detected it with the same cdcacm/dfu
|
|
//descriptor as the ROM uses; we can just re-initialize the software side and have at 'er.
|
|
#define USBDC_PERSIST_ENA (1<<31)
|
|
|
|
//This bit indicates to the ROM that we rebooted because of a request to go into DFU mode; the ROM should
|
|
//honour this request.
|
|
#define USBDC_BOOT_DFU (1<<30)
|
|
|
|
|
|
//This being non-0 indicates a memory location where a 'testament' is stored, aka a piece of text that should be output
|
|
//after a reboot. Can contain core dump info or something.
|
|
#define USBDC_TESTAMENT_LOC_MASK 0x7FFFF //bits 19-0; this is added to a base address of SOC_MEM_INTERNAL_LOW. (0x3FF9E000)
|
|
|
|
//The testament is a FIFO. The ROM will output all data between textstart and textend; if textend is lower than textstart it will
|
|
//output everything from textstart to memend, then memstart to textend.
|
|
typedef struct {
|
|
char *memstart; //start of memory region
|
|
char *memend; //end of memory region
|
|
char *textstart; //start of text to output
|
|
char *textend;
|
|
} usbdc_testament_t;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|