🎨 Misc. cleanup 29-01
This commit is contained in:
parent
541bd26cd7
commit
5639237e2b
|
@ -2,7 +2,7 @@
|
|||
|
||||
Marlin Firmware
|
||||
|
||||
(c) 2011-2023 MarlinFirmware
|
||||
(c) 2011-2024 MarlinFirmware
|
||||
Portions of Marlin are (c) by their respective authors.
|
||||
All code complies with GPLv2 and/or GPLv3
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ void spiBegin() {
|
|||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||
}
|
||||
|
||||
|
||||
/** begin spi transaction */
|
||||
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
||||
// Based on Arduino SPI library
|
||||
|
@ -175,7 +174,6 @@ void spiBegin() {
|
|||
SPSR = clockDiv | 0x01;
|
||||
}
|
||||
|
||||
|
||||
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
||||
|
||||
// ------------------------
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
|
||||
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||
|
||||
|
||||
/************ static functions common to all instances ***********************/
|
||||
|
||||
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
|
||||
|
|
|
@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); }
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
// Install Pin change interrupt for a pin. Can be called multiple times.
|
||||
void pciSetup(const int8_t pin) {
|
||||
if (digitalPinHasPCICR(pin)) {
|
||||
|
|
|
@ -679,7 +679,6 @@
|
|||
#define PF7_PWM 0
|
||||
#define PF7_DDR DDRF
|
||||
|
||||
|
||||
/**
|
||||
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
||||
* do not function the same as the other Arduino extensions.
|
||||
|
|
|
@ -163,7 +163,6 @@ bool pwm_status(uint8_t pin) {
|
|||
SERIAL_ECHO_SP(2);
|
||||
} // pwm_status
|
||||
|
||||
|
||||
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
|
||||
{ &TCCR0A, &TCCR0B, &TIMSK0 },
|
||||
{ &TCCR1A, &TCCR1B, &TIMSK1 },
|
||||
|
@ -181,7 +180,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = {
|
|||
#endif
|
||||
};
|
||||
|
||||
|
||||
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
|
||||
|
||||
#ifdef TIMER0A
|
||||
|
@ -217,7 +215,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
|
|||
#endif
|
||||
};
|
||||
|
||||
|
||||
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
|
||||
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
|
||||
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])
|
||||
|
|
|
@ -120,7 +120,6 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
|
|||
U8G_ATOMIC_END();
|
||||
}
|
||||
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
|
||||
#else
|
||||
|
|
|
@ -474,7 +474,6 @@ void MarlinSerial<Cfg>::flushTX() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// If not using the USB port as serial port
|
||||
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
||||
|
|
|
@ -49,7 +49,6 @@ extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B;
|
|||
|
||||
#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }
|
||||
|
||||
|
||||
#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
|
||||
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
|
||||
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
|
||||
|
|
|
@ -168,7 +168,6 @@ const G2_PinDescription G2_g_APinDescription[] = {
|
|||
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
|
||||
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53
|
||||
|
||||
|
||||
// 54 .. 65 - Analog pins
|
||||
// ----------------------
|
||||
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
|
||||
|
|
|
@ -142,7 +142,6 @@
|
|||
*/
|
||||
#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set aligned boundary.
|
||||
*/
|
||||
|
@ -283,7 +282,6 @@ typedef double F64; //!< 64-bit floating-point number.
|
|||
typedef uint32_t iram_size_t;
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Status Types
|
||||
*/
|
||||
//! @{
|
||||
|
@ -291,7 +289,6 @@ typedef bool Status_bool_t; //!< Boolean status.
|
|||
typedef U8 Status_t; //!< 8-bit-coded status.
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Aliasing Aggregate Types
|
||||
*/
|
||||
//! @{
|
||||
|
@ -462,7 +459,6 @@ typedef struct
|
|||
#endif
|
||||
//! @}
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__ // not for assembling.
|
||||
|
||||
//! \name Optimization Control
|
||||
|
@ -581,7 +577,6 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Zero-Bit Counting
|
||||
*
|
||||
* Under GCC, __builtin_clz and __builtin_ctz behave like macros when
|
||||
|
@ -692,7 +687,6 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Bit Reversing
|
||||
*/
|
||||
//! @{
|
||||
|
@ -732,7 +726,6 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Alignment
|
||||
*/
|
||||
//! @{
|
||||
|
@ -798,7 +791,6 @@ typedef struct
|
|||
*/
|
||||
#define Long_call(addr) ((*(void (*)(void))(addr))())
|
||||
|
||||
|
||||
/*! \name MCU Endianism Handling
|
||||
* ARM is MCU little endianism.
|
||||
*/
|
||||
|
@ -868,7 +860,6 @@ typedef struct
|
|||
#define CPU_TO_BE32(x) swap32(x)
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Endianism Conversion
|
||||
*
|
||||
* The same considerations as for clz and ctz apply here but GCC's
|
||||
|
@ -955,7 +946,6 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Target Abstraction
|
||||
*/
|
||||
//! @{
|
||||
|
@ -997,7 +987,6 @@ typedef U8 Byte; //!< 8-bit unsigned integer.
|
|||
|
||||
#endif // #ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#define SHORTENUM __packed
|
||||
#elif defined(__GNUC__)
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
#define LUN_0_NAME "\"SD/MMC Card\""
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Actions Associated with Memory Accesses
|
||||
*
|
||||
* Write here the action to associate with each memory access.
|
||||
|
@ -112,5 +111,4 @@
|
|||
#define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _CONF_ACCESS_H_
|
||||
|
|
|
@ -96,5 +96,4 @@
|
|||
// - UPLL frequency: 480MHz
|
||||
// - USB clock: 480 / 1 = 480MHz
|
||||
|
||||
|
||||
#endif /* CONF_CLOCK_H_INCLUDED */
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
#endif
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* USB Device Callbacks definitions (Optional)
|
||||
* @{
|
||||
|
@ -150,7 +149,6 @@
|
|||
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* USB Interface Configuration
|
||||
* @{
|
||||
|
@ -210,7 +208,6 @@
|
|||
//@}
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* Configuration of MSC interface
|
||||
* @{
|
||||
|
@ -245,7 +242,6 @@
|
|||
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* Description of Composite Device
|
||||
* @{
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
#endif
|
||||
#include "ctrl_access.h"
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
#ifdef FREERTOS_USED
|
||||
|
@ -112,7 +111,6 @@ static xSemaphoreHandle ctrl_access_semphr = NULL;
|
|||
|
||||
#endif // FREERTOS_USED
|
||||
|
||||
|
||||
#if MAX_LUN
|
||||
|
||||
/*! \brief Initializes an entry of the LUN descriptor table.
|
||||
|
@ -242,17 +240,14 @@ static const struct
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
#if GLOBAL_WR_PROTECT == true
|
||||
bool g_wr_protect;
|
||||
#endif
|
||||
|
||||
|
||||
/*! \name Control Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
#ifdef FREERTOS_USED
|
||||
|
||||
bool ctrl_access_init(void)
|
||||
|
@ -270,7 +265,6 @@ bool ctrl_access_init(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Locks accesses to LUNs.
|
||||
*
|
||||
* \return \c true if the access was successfully locked, else \c false.
|
||||
|
@ -288,7 +282,6 @@ static bool ctrl_access_lock(void)
|
|||
|
||||
#endif // FREERTOS_USED
|
||||
|
||||
|
||||
U8 get_nb_lun(void)
|
||||
{
|
||||
#if MEM_USB == ENABLE
|
||||
|
@ -309,13 +302,11 @@ U8 get_nb_lun(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
U8 get_cur_lun(void)
|
||||
{
|
||||
return LUN_ID_0;
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status mem_test_unit_ready(U8 lun)
|
||||
{
|
||||
Ctrl_status status;
|
||||
|
@ -337,7 +328,6 @@ Ctrl_status mem_test_unit_ready(U8 lun)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
|
||||
{
|
||||
Ctrl_status status;
|
||||
|
@ -359,7 +349,6 @@ Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
U8 mem_sector_size(U8 lun)
|
||||
{
|
||||
U8 sector_size;
|
||||
|
@ -381,7 +370,6 @@ U8 mem_sector_size(U8 lun)
|
|||
return sector_size;
|
||||
}
|
||||
|
||||
|
||||
bool mem_unload(U8 lun, bool unload)
|
||||
{
|
||||
bool unloaded;
|
||||
|
@ -433,7 +421,6 @@ bool mem_wr_protect(U8 lun)
|
|||
return wr_protect;
|
||||
}
|
||||
|
||||
|
||||
bool mem_removal(U8 lun)
|
||||
{
|
||||
bool removal;
|
||||
|
@ -458,7 +445,6 @@ bool mem_removal(U8 lun)
|
|||
return removal;
|
||||
}
|
||||
|
||||
|
||||
const char *mem_name(U8 lun)
|
||||
{
|
||||
#if MAX_LUN==0
|
||||
|
@ -475,17 +461,14 @@ const char *mem_name(U8 lun)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
#if ACCESS_USB == true
|
||||
|
||||
/*! \name MEM <-> USB Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
|
||||
{
|
||||
Ctrl_status status;
|
||||
|
@ -505,7 +488,6 @@ Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
|
||||
{
|
||||
Ctrl_status status;
|
||||
|
@ -525,19 +507,16 @@ Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // ACCESS_USB == true
|
||||
|
||||
|
||||
#if ACCESS_MEM_TO_RAM == true
|
||||
|
||||
/*! \name MEM <-> RAM Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
|
||||
{
|
||||
Ctrl_status status;
|
||||
|
@ -564,7 +543,6 @@ Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
|
||||
{
|
||||
Ctrl_status status;
|
||||
|
@ -591,19 +569,16 @@ Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // ACCESS_MEM_TO_RAM == true
|
||||
|
||||
|
||||
#if ACCESS_STREAM == true
|
||||
|
||||
/*! \name Streaming MEM <-> MEM Interface
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
||||
#if ACCESS_MEM_TO_MEM == true
|
||||
|
||||
#include "fat.h"
|
||||
|
@ -625,21 +600,18 @@ Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_ad
|
|||
|
||||
#endif // ACCESS_MEM_TO_MEM == true
|
||||
|
||||
|
||||
Ctrl_status stream_state(U8 id)
|
||||
{
|
||||
UNUSED(id);
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
|
||||
U16 stream_stop(U8 id)
|
||||
{
|
||||
UNUSED(id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // ACCESS_STREAM
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CTRL_ACCESS_H_
|
||||
#define _CTRL_ACCESS_H_
|
||||
|
||||
|
@ -89,7 +88,6 @@ typedef enum
|
|||
CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed.
|
||||
} Ctrl_status;
|
||||
|
||||
|
||||
// FYI: Each Logical Unit Number (LUN) corresponds to a memory.
|
||||
|
||||
// Check LUN defines.
|
||||
|
@ -136,7 +134,6 @@ typedef enum
|
|||
#define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage).
|
||||
//! @}
|
||||
|
||||
|
||||
// Include LUN header files.
|
||||
#if LUN_0 == ENABLE
|
||||
#include LUN_0_INCLUDE
|
||||
|
@ -166,13 +163,11 @@ typedef enum
|
|||
#include LUN_USB_INCLUDE
|
||||
#endif
|
||||
|
||||
|
||||
// Check the configuration of write protection in conf_access.h.
|
||||
#ifndef GLOBAL_WR_PROTECT
|
||||
#error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h
|
||||
#endif
|
||||
|
||||
|
||||
#if GLOBAL_WR_PROTECT == true
|
||||
|
||||
//! Write protect.
|
||||
|
@ -180,7 +175,6 @@ extern bool g_wr_protect;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
/*! \name Control Interface
|
||||
*/
|
||||
//! @{
|
||||
|
@ -279,7 +273,6 @@ extern const char *mem_name(U8 lun);
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
#if ACCESS_USB == true
|
||||
|
||||
/*! \name MEM <-> USB Interface
|
||||
|
@ -310,7 +303,6 @@ extern Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector);
|
|||
|
||||
#endif // ACCESS_USB == true
|
||||
|
||||
|
||||
#if ACCESS_MEM_TO_RAM == true
|
||||
|
||||
/*! \name MEM <-> RAM Interface
|
||||
|
@ -341,7 +333,6 @@ extern Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram);
|
|||
|
||||
#endif // ACCESS_MEM_TO_RAM == true
|
||||
|
||||
|
||||
#if ACCESS_STREAM == true
|
||||
|
||||
/*! \name Streaming MEM <-> MEM Interface
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
|
||||
#include "preprocessor.h"
|
||||
|
||||
|
||||
//! Maximal number of repetitions supported by MREPEAT.
|
||||
#define MREPEAT_LIMIT 256
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ static inline void osc_enable(uint32_t ul_id) {
|
|||
pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS);
|
||||
break;
|
||||
|
||||
|
||||
case OSC_MAINCK_4M_RC:
|
||||
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz);
|
||||
break;
|
||||
|
@ -141,7 +140,6 @@ static inline void osc_enable(uint32_t ul_id) {
|
|||
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz);
|
||||
break;
|
||||
|
||||
|
||||
case OSC_MAINCK_XTAL:
|
||||
pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*,
|
||||
pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US,
|
||||
|
|
|
@ -51,5 +51,4 @@
|
|||
#include "stringz.h"
|
||||
#include "mrepeat.h"
|
||||
|
||||
|
||||
#endif // _PREPROCESSOR_H_
|
||||
|
|
|
@ -86,7 +86,6 @@ enum scsi_sbc_mode {
|
|||
SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page
|
||||
};
|
||||
|
||||
|
||||
//! \name SBC-2 Device-Specific Parameter
|
||||
//@{
|
||||
#define SCSI_MS_SBC_WP 0x80 //!< Write Protected
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SD_MMC_SPI_MEM_H_
|
||||
#define _SD_MMC_SPI_MEM_H_
|
||||
|
||||
|
@ -63,17 +62,14 @@
|
|||
#error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled
|
||||
#endif
|
||||
|
||||
|
||||
#include "ctrl_access.h"
|
||||
|
||||
|
||||
//_____ D E F I N I T I O N S ______________________________________________
|
||||
|
||||
#define SD_MMC_REMOVED 0
|
||||
#define SD_MMC_INSERTED 1
|
||||
#define SD_MMC_REMOVING 2
|
||||
|
||||
|
||||
//---- CONTROL FUNCTIONS ----
|
||||
//!
|
||||
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
|
||||
|
@ -133,7 +129,6 @@ extern bool sd_mmc_spi_wr_protect(void);
|
|||
//!
|
||||
extern bool sd_mmc_spi_removal(void);
|
||||
|
||||
|
||||
//---- ACCESS DATA FUNCTIONS ----
|
||||
|
||||
#if ACCESS_USB == true
|
||||
|
|
|
@ -212,7 +212,6 @@ extern "C" {
|
|||
#define CONFIG_USBCLK_DIV
|
||||
#endif
|
||||
|
||||
|
||||
extern void sysclk_enable_usb(void);
|
||||
extern void sysclk_disable_usb(void);
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface;
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
//! \name Internal structure to store the USB device main strings
|
||||
//! @{
|
||||
|
||||
|
|
|
@ -685,6 +685,4 @@ usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void);
|
|||
} \endcode
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#endif // _UDC_H_
|
||||
|
|
|
@ -213,7 +213,6 @@ void udd_send_remotewakeup(void);
|
|||
*/
|
||||
void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size );
|
||||
|
||||
|
||||
/**
|
||||
* \name Endpoint Management
|
||||
*
|
||||
|
|
|
@ -457,7 +457,6 @@ void udi_cdc_data_sof_notify(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
// ------------------------
|
||||
//------- Internal routines to control serial line
|
||||
|
||||
|
@ -520,7 +519,6 @@ static void udi_cdc_ctrl_state_change(uint8_t port, bool b_set, le16_t bit_mask)
|
|||
udi_cdc_ctrl_state_notify(port, ep_comm);
|
||||
}
|
||||
|
||||
|
||||
static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
|
||||
{
|
||||
#if UDI_CDC_PORT_NB == 1 // To optimize code
|
||||
|
@ -542,7 +540,6 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t port;
|
||||
|
@ -578,11 +575,9 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n,
|
|||
udi_cdc_ctrl_state_notify(port, ep);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------
|
||||
//------- Internal routines to process data transfer
|
||||
|
||||
|
||||
static bool udi_cdc_rx_start(uint8_t port)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -632,7 +627,6 @@ static bool udi_cdc_rx_start(uint8_t port)
|
|||
udi_cdc_data_received);
|
||||
}
|
||||
|
||||
|
||||
static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t buf_sel_trans;
|
||||
|
@ -668,7 +662,6 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
|
|||
udi_cdc_rx_start(port);
|
||||
}
|
||||
|
||||
|
||||
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t port;
|
||||
|
@ -700,7 +693,6 @@ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t
|
|||
udi_cdc_tx_send(port);
|
||||
}
|
||||
|
||||
|
||||
static void udi_cdc_tx_send(uint8_t port)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -780,11 +772,9 @@ static void udi_cdc_tx_send(uint8_t port)
|
|||
udi_cdc_data_sent);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------
|
||||
//------- Application interface
|
||||
|
||||
|
||||
//------- Application interface
|
||||
|
||||
void udi_cdc_ctrl_signal_dcd(bool b_set)
|
||||
|
|
|
@ -106,7 +106,6 @@ typedef struct {
|
|||
usb_ep_desc_t ep_notify;
|
||||
} udi_cdc_comm_desc_t;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Data Class interface descriptor
|
||||
*
|
||||
|
@ -121,7 +120,6 @@ typedef struct {
|
|||
usb_ep_desc_t ep_out;
|
||||
} udi_cdc_data_desc_t;
|
||||
|
||||
|
||||
//! CDC communication endpoints size for all speeds
|
||||
#define UDI_CDC_COMM_EP_SIZE 64
|
||||
//! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)
|
||||
|
|
|
@ -109,7 +109,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
|
|||
.bNumConfigurations = 1
|
||||
};
|
||||
|
||||
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
//! USB Device Qualifier Descriptor for HS
|
||||
COMPILER_WORD_ALIGNED
|
||||
|
|
|
@ -93,7 +93,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
|
|||
.bNumConfigurations = 1
|
||||
};
|
||||
|
||||
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
//! USB Device Qualifier Descriptor for HS
|
||||
COMPILER_WORD_ALIGNED
|
||||
|
@ -147,7 +146,6 @@ UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
|
|||
};
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \name UDC structures which contains all USB Device definitions
|
||||
*/
|
||||
|
|
|
@ -86,7 +86,6 @@ UDC_DESC_STORAGE udi_api_t udi_api_msc = {
|
|||
};
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup udi_msc_group
|
||||
* \defgroup udi_msc_group_internal Implementation of UDI MSC
|
||||
|
@ -137,7 +136,6 @@ volatile bool udi_msc_b_reset_trans = true;
|
|||
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Internal routines
|
||||
*/
|
||||
|
@ -190,7 +188,6 @@ static void udi_msc_cbw_received(udd_ep_status_t status,
|
|||
static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag);
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Routines to process small data packet
|
||||
*/
|
||||
|
@ -217,7 +214,6 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
|||
udd_ep_id_t ep);
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Routines to process CSW packet
|
||||
*/
|
||||
|
@ -250,7 +246,6 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
|||
udd_ep_id_t ep);
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Routines manage sense data
|
||||
*/
|
||||
|
@ -307,7 +302,6 @@ static void udi_msc_sense_fail_cdb_invalid(void);
|
|||
static void udi_msc_sense_command_invalid(void);
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Routines manage SCSI Commands
|
||||
*/
|
||||
|
|
|
@ -293,7 +293,6 @@ do { \
|
|||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \name Power management routine.
|
||||
*/
|
||||
|
@ -310,7 +309,6 @@ static bool udd_b_idle;
|
|||
//! State of sleep manager
|
||||
static bool udd_b_sleep_initialized = false;
|
||||
|
||||
|
||||
/*! \brief Authorize or not the CPU powerdown mode
|
||||
*
|
||||
* \param b_enable true to authorize idle mode
|
||||
|
@ -338,7 +336,6 @@ static void udd_sleep_mode(bool b_idle)
|
|||
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Control endpoint low level management routine.
|
||||
*
|
||||
|
@ -410,7 +407,6 @@ static void udd_ctrl_send_zlp_out(void);
|
|||
//! \brief Call callback associated to setup request
|
||||
static void udd_ctrl_endofrequest(void);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Main interrupt routine for control endpoint
|
||||
*
|
||||
|
@ -422,7 +418,6 @@ static bool udd_ctrl_interrupt(void);
|
|||
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name Management of bulk/interrupt/isochronous endpoints
|
||||
*
|
||||
|
@ -460,7 +455,6 @@ typedef struct {
|
|||
uint8_t stall_requested:1;
|
||||
} udd_ep_job_t;
|
||||
|
||||
|
||||
//! Array to register a job on bulk/interrupt/isochronous endpoint
|
||||
static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
|
||||
|
||||
|
@ -522,7 +516,6 @@ static bool udd_ep_interrupt(void);
|
|||
#endif // (0!=USB_DEVICE_MAX_EP)
|
||||
//@}
|
||||
|
||||
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
|
||||
|
||||
|
@ -671,13 +664,11 @@ udd_interrupt_sof_end:
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
bool udd_include_vbus_monitoring(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void udd_enable(void)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -764,7 +755,6 @@ void udd_enable(void)
|
|||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
void udd_disable(void)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -866,7 +856,6 @@ void udd_attach(void)
|
|||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
void udd_detach(void)
|
||||
{
|
||||
otg_unfreeze_clock();
|
||||
|
@ -883,7 +872,6 @@ void udd_detach(void)
|
|||
udd_sleep_mode(false);
|
||||
}
|
||||
|
||||
|
||||
bool udd_is_high_speed(void)
|
||||
{
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
|
@ -893,7 +881,6 @@ bool udd_is_high_speed(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void udd_set_address(uint8_t address)
|
||||
{
|
||||
udd_disable_address();
|
||||
|
@ -901,13 +888,11 @@ void udd_set_address(uint8_t address)
|
|||
udd_enable_address();
|
||||
}
|
||||
|
||||
|
||||
uint8_t udd_getaddress(void)
|
||||
{
|
||||
return udd_get_configured_address();
|
||||
}
|
||||
|
||||
|
||||
uint16_t udd_get_frame_number(void)
|
||||
{
|
||||
return udd_frame_number();
|
||||
|
@ -930,14 +915,12 @@ void udd_send_remotewakeup(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size)
|
||||
{
|
||||
udd_g_ctrlreq.payload = payload;
|
||||
udd_g_ctrlreq.payload_size = payload_size;
|
||||
}
|
||||
|
||||
|
||||
#if (0 != USB_DEVICE_MAX_EP)
|
||||
bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
|
||||
uint16_t MaxEndpointSize)
|
||||
|
@ -1061,7 +1044,6 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void udd_ep_free(udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||
|
@ -1074,14 +1056,12 @@ void udd_ep_free(udd_ep_id_t ep)
|
|||
udd_ep_job[ep_index - 1].stall_requested = false;
|
||||
}
|
||||
|
||||
|
||||
bool udd_ep_is_halted(udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||
return Is_udd_endpoint_stall_requested(ep_index);
|
||||
}
|
||||
|
||||
|
||||
bool udd_ep_set_halt(udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||
|
@ -1122,7 +1102,6 @@ bool udd_ep_set_halt(udd_ep_id_t ep)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool udd_ep_clear_halt(udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||
|
@ -1163,7 +1142,6 @@ bool udd_ep_clear_halt(udd_ep_id_t ep)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
|
||||
uint8_t * buf, iram_size_t buf_size,
|
||||
udd_callback_trans_t callback)
|
||||
|
@ -1230,7 +1208,6 @@ bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void udd_ep_abort(udd_ep_id_t ep)
|
||||
{
|
||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||
|
@ -1259,7 +1236,6 @@ void udd_ep_abort(udd_ep_id_t ep)
|
|||
udd_ep_abort_job(ep);
|
||||
}
|
||||
|
||||
|
||||
bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
|
||||
udd_callback_halt_cleared_t callback)
|
||||
{
|
||||
|
@ -1294,7 +1270,6 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
|
|||
}
|
||||
#endif // (0 != USB_DEVICE_MAX_EP)
|
||||
|
||||
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
|
||||
void udd_test_mode_j(void)
|
||||
|
@ -1303,20 +1278,17 @@ void udd_test_mode_j(void)
|
|||
udd_enable_hs_test_mode_j();
|
||||
}
|
||||
|
||||
|
||||
void udd_test_mode_k(void)
|
||||
{
|
||||
udd_enable_hs_test_mode();
|
||||
udd_enable_hs_test_mode_k();
|
||||
}
|
||||
|
||||
|
||||
void udd_test_mode_se0_nak(void)
|
||||
{
|
||||
udd_enable_hs_test_mode();
|
||||
}
|
||||
|
||||
|
||||
void udd_test_mode_packet(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
@ -1360,8 +1332,6 @@ void udd_test_mode_packet(void)
|
|||
}
|
||||
#endif // USB_DEVICE_HS_SUPPORT
|
||||
|
||||
|
||||
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
|
||||
|
||||
|
@ -1411,7 +1381,6 @@ static void udd_ctrl_init(void)
|
|||
udd_ep_control_state = UDD_EPCTRL_SETUP;
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_setup_received(void)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -1473,7 +1442,6 @@ static void udd_ctrl_setup_received(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_in_sent(void)
|
||||
{
|
||||
static bool b_shortpacket = false;
|
||||
|
@ -1557,7 +1525,6 @@ static void udd_ctrl_in_sent(void)
|
|||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_out_received(void)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -1648,7 +1615,6 @@ static void udd_ctrl_out_received(void)
|
|||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_underflow(void)
|
||||
{
|
||||
if (Is_udd_out_received(0))
|
||||
|
@ -1665,7 +1631,6 @@ static void udd_ctrl_underflow(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_overflow(void)
|
||||
{
|
||||
if (Is_udd_in_send(0))
|
||||
|
@ -1681,7 +1646,6 @@ static void udd_ctrl_overflow(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_stall_data(void)
|
||||
{
|
||||
// Stall all packets on IN & OUT control endpoint
|
||||
|
@ -1689,7 +1653,6 @@ static void udd_ctrl_stall_data(void)
|
|||
udd_enable_stall_handshake(0);
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_send_zlp_in(void)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -1707,7 +1670,6 @@ static void udd_ctrl_send_zlp_in(void)
|
|||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_send_zlp_out(void)
|
||||
{
|
||||
irqflags_t flags;
|
||||
|
@ -1723,7 +1685,6 @@ static void udd_ctrl_send_zlp_out(void)
|
|||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
static void udd_ctrl_endofrequest(void)
|
||||
{
|
||||
// If a callback is registered then call it
|
||||
|
@ -1732,7 +1693,6 @@ static void udd_ctrl_endofrequest(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static bool udd_ctrl_interrupt(void)
|
||||
{
|
||||
|
||||
|
@ -1783,7 +1743,6 @@ static bool udd_ctrl_interrupt(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------
|
||||
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
|
||||
|
||||
|
@ -1798,7 +1757,6 @@ static void udd_ep_job_table_reset(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void udd_ep_job_table_kill(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
@ -1809,7 +1767,6 @@ static void udd_ep_job_table_kill(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void udd_ep_abort_job(udd_ep_id_t ep)
|
||||
{
|
||||
ep &= USB_EP_ADDR_MASK;
|
||||
|
@ -1818,7 +1775,6 @@ static void udd_ep_abort_job(udd_ep_id_t ep)
|
|||
udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep);
|
||||
}
|
||||
|
||||
|
||||
static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num)
|
||||
{
|
||||
if (ptr_job->busy == false) {
|
||||
|
@ -1889,7 +1845,6 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
|
|||
udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT |
|
||||
UOTGHS_DEVDMACONTROL_CHANN_ENB;
|
||||
|
||||
|
||||
// Disable IRQs to have a short sequence
|
||||
// between read of EOT_STA and DMA enable
|
||||
flags = cpu_irq_save();
|
||||
|
|
|
@ -129,7 +129,6 @@ extern "C" {
|
|||
#define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
|
||||
//! @}
|
||||
|
||||
|
||||
//! @name UOTGHS device attach control
|
||||
//! These macros manage the UOTGHS Device attach.
|
||||
//! @{
|
||||
|
@ -141,7 +140,6 @@ extern "C" {
|
|||
#define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
|
||||
//! @}
|
||||
|
||||
|
||||
//! @name UOTGHS device bus events control
|
||||
//! These macros manage the UOTGHS Device bus events.
|
||||
//! @{
|
||||
|
@ -246,7 +244,6 @@ extern "C" {
|
|||
#define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
|
||||
//! @}
|
||||
|
||||
|
||||
//! @name UOTGHS Device endpoint drivers
|
||||
//! These macros manage the common features of the endpoints.
|
||||
//! @{
|
||||
|
@ -330,7 +327,6 @@ extern "C" {
|
|||
#define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk))
|
||||
//! @}
|
||||
|
||||
|
||||
//! @name UOTGHS Device control endpoint
|
||||
//! These macros control the endpoints.
|
||||
//! @{
|
||||
|
@ -530,7 +526,6 @@ extern "C" {
|
|||
//! Tests if IN sending interrupt is enabled
|
||||
#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE))
|
||||
|
||||
|
||||
//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
|
||||
//! @param ep Endpoint of which to access FIFO data register
|
||||
//! @param scale Data scale in bits: 64, 32, 16 or 8
|
||||
|
@ -652,7 +647,6 @@ typedef struct {
|
|||
//! @}
|
||||
//! @}
|
||||
|
||||
|
||||
/// @cond 0
|
||||
/**INDENT-OFF**/
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//! \ingroup usb_group
|
||||
//! \defgroup otg_group UOTGHS OTG Driver
|
||||
//! UOTGHS low-level driver for OTG features
|
||||
|
@ -74,7 +73,6 @@ bool otg_dual_enable(void);
|
|||
*/
|
||||
void otg_dual_disable(void);
|
||||
|
||||
|
||||
//! @name UOTGHS OTG ID pin management
|
||||
//! The ID pin come from the USB OTG connector (A and B receptable) and
|
||||
//! allows to select the USB mode host or device.
|
||||
|
|
|
@ -374,7 +374,6 @@ typedef struct {
|
|||
uint8_t bNumDeviceCaps;
|
||||
} usb_dev_bos_desc_t;
|
||||
|
||||
|
||||
/**
|
||||
* \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure
|
||||
*
|
||||
|
@ -411,7 +410,6 @@ typedef struct {
|
|||
uint8_t iFunction; //!< Index of string descriptor
|
||||
} usb_association_desc_t;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Standard USB configuration descriptor structure
|
||||
*/
|
||||
|
@ -426,7 +424,6 @@ typedef struct {
|
|||
uint8_t bMaxPower;
|
||||
} usb_conf_desc_t;
|
||||
|
||||
|
||||
#define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set
|
||||
#define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered
|
||||
#define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered
|
||||
|
@ -475,7 +472,6 @@ typedef struct {
|
|||
uint8_t bInterval;
|
||||
} usb_ep_desc_t;
|
||||
|
||||
|
||||
/**
|
||||
* \brief A standard USB string descriptor structure
|
||||
*/
|
||||
|
|
|
@ -168,7 +168,6 @@ COMPILER_PACK_SET(1)
|
|||
//! \name USB CDC Descriptors
|
||||
//@{
|
||||
|
||||
|
||||
//! CDC Header Functional Descriptor
|
||||
typedef struct {
|
||||
uint8_t bFunctionLength;
|
||||
|
@ -203,7 +202,6 @@ typedef struct {
|
|||
uint8_t bSlaveInterface0;
|
||||
} usb_cdc_union_desc_t;
|
||||
|
||||
|
||||
//! \name USB CDC Call Management Capabilities
|
||||
//@{
|
||||
//! Device handles call management itself
|
||||
|
@ -278,7 +276,6 @@ typedef struct {
|
|||
//@}
|
||||
//@}
|
||||
|
||||
|
||||
//! \name USB CDC notification message
|
||||
//@{
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#ifndef _USB_PROTOCOL_MSC_H_
|
||||
#define _USB_PROTOCOL_MSC_H_
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup usb_protocol_group
|
||||
* \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions
|
||||
|
@ -89,7 +88,6 @@
|
|||
#define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \brief MSC USB requests (bRequest)
|
||||
*/
|
||||
|
@ -98,7 +96,6 @@ enum usb_reqid_msc {
|
|||
USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN
|
||||
};
|
||||
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
/**
|
||||
|
@ -122,7 +119,6 @@ struct usb_msc_cbw {
|
|||
#define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength
|
||||
//@}
|
||||
|
||||
|
||||
/**
|
||||
* \name A Command Status Wrapper (CSW).
|
||||
*/
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
|
||||
#define INVALID_SERVO 255 // flag indicating an invalid servo index
|
||||
|
||||
|
||||
// Types
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -8,14 +8,12 @@ DriverVer =04/14/2008, 5.1.2600.5512
|
|||
[Manufacturer]
|
||||
%PROVIDER%=DeviceList,ntamd64
|
||||
|
||||
|
||||
[DeviceList]
|
||||
%DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00
|
||||
|
||||
[DeviceList.ntamd64]
|
||||
%DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00
|
||||
|
||||
|
||||
[LPC1768USB]
|
||||
include=mdmcpq.inf
|
||||
CopyFiles=FakeModemCopyFileSection
|
||||
|
@ -28,9 +26,8 @@ AddService=usbser, 0x00000002, LowerFilter_Service_Inst
|
|||
[SerialPropPageAddReg]
|
||||
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
|
||||
|
||||
|
||||
[Strings]
|
||||
PROVIDER = "marlinfw.org"
|
||||
DRIVER.SVC = "Marlin USB Driver"
|
||||
DESCRIPTION= "Marlin USB Serial"
|
||||
COMPOSITE = "Marlin USB VCOM"
|
||||
COMPOSITE = "Marlin USB VCOM"
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
|
||||
#define INVALID_SERVO 255 // flag indicating an invalid servo index
|
||||
|
||||
|
||||
// Types
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
* resulted in using about about 25% of the CPU's time.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
DefaultSerial3 MSerial2(false, Serial2);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define WDT_CONFIG_PER_7_Val 0x9u
|
||||
#define WDT_CONFIG_PER_Pos 0
|
||||
#define WDT_CONFIG_PER_7 (WDT_CONFIG_PER_7_Val << WDT_CONFIG_PER_Pos)
|
||||
|
@ -165,7 +163,6 @@ void MarlinHAL::adc_init() {
|
|||
ADC->REFCTRL.reg = ADC_REFCTRL_REFSEL_INTVCC1;
|
||||
ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_32| ADC_AVGCTRL_ADJRES(4);;
|
||||
|
||||
|
||||
ADC->CTRLB.reg = ADC_CTRLB_PRESCALER_DIV128 |
|
||||
ADC_CTRLB_RESSEL_16BIT |
|
||||
ADC_CTRLB_FREERUN;
|
||||
|
|
|
@ -47,7 +47,6 @@ typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
|
|||
extern DefaultSerial2 MSerial0;
|
||||
extern DefaultSerial3 MSerial1;
|
||||
|
||||
|
||||
#define __MSERIAL(X) MSerial##X
|
||||
#define _MSERIAL(X) __MSERIAL(X)
|
||||
#define MSERIAL(X) _MSERIAL(INCREMENT(X))
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
: (P == 3 && WITHIN(B, 20, 21)) ? 10 + (B) - 20 \
|
||||
: -1)
|
||||
|
||||
|
||||
|
||||
#define A2_AIN 3
|
||||
#define A3_AIN 4
|
||||
#define A4_AIN 5
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
#define TIMER_TCCHANNEL(t) ((t) & 1)
|
||||
#define TC_COUNTER_START_VAL 0xFFFF
|
||||
|
||||
|
||||
static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||
|
||||
FORCE_INLINE static uint16_t getTimerCount() {
|
||||
|
|
|
@ -85,7 +85,6 @@ void u8g_SetPILevel(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
|
|||
|
||||
uint8_t u8g_com_samd21_st7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||
|
||||
|
||||
switch (msg) {
|
||||
case U8G_COM_MSG_STOP:
|
||||
break;
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#define TIMER_TCCHANNEL(t) ((t) & 1)
|
||||
#define TC_COUNTER_START_VAL 0xFFFF
|
||||
|
||||
|
||||
static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||
|
||||
FORCE_INLINE static uint16_t getTimerCount() {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
//#endif
|
||||
|
||||
|
||||
#if ENABLED(SDCARD_EEPROM_EMULATION) && !HAS_MEDIA
|
||||
#undef SDCARD_EEPROM_EMULATION // Avoid additional error noise
|
||||
#if USE_FALLBACK_EEPROM
|
||||
|
|
|
@ -850,7 +850,6 @@ typedef struct {
|
|||
__IO uint32_t BDCR; /* compatible */
|
||||
__IO uint32_t CSR; /* compatible */
|
||||
|
||||
|
||||
__IO uint32_t AHBRSTR; /* Not compatible, ADC reset here settings */
|
||||
__IO uint32_t CFGR2; /* Not compatible, ADC clock settings here */
|
||||
__IO uint32_t CFGR3; /* Not compatible, add a new register */
|
||||
|
|
|
@ -517,7 +517,6 @@ uint8_t SPIClass::dmaSendAsync(const void * transmitBuf, uint16_t length, bool m
|
|||
return b;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* New functions added to manage callbacks.
|
||||
* Victor Perez 2017
|
||||
|
|
|
@ -48,7 +48,6 @@ ServiceBinary=%12%\usbser.sys
|
|||
; String Definitions
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
|
||||
[Strings]
|
||||
STM = "LeafLabs"
|
||||
MFGNAME = "LeafLabs"
|
||||
|
|
|
@ -47,7 +47,6 @@ typedef enum {
|
|||
RES_PARERR /* 4: Invalid Parameter */
|
||||
} DRESULT;
|
||||
|
||||
|
||||
#if _DISKIO_ISDIO
|
||||
/* Command structure for iSDIO ioctl command */
|
||||
typedef struct {
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
#define ACMD41_SD_APP_OP_COND (uint16_t)(SDMMC_ACMD_SD_APP_OP_COND | SDIO_CMD_WAIT_SHORT_RESP)
|
||||
#define ACMD42_SD_APP_SET_CLR_CARD_DETECT (uint16_t)(SDMMC_ACMD_SD_APP_SET_CLR_CARD_DETECT | SDIO_CMD_WAIT_SHORT_RESP)
|
||||
|
||||
|
||||
#define SDMMC_ALLZERO 0x00000000U
|
||||
#define SDMMC_OCR_ERRORBITS 0xFDFFE008U
|
||||
|
||||
|
|
|
@ -120,7 +120,6 @@ void spiSendBlock(uint8_t token, const uint8_t *buf) {
|
|||
SPI.endTransaction();
|
||||
}
|
||||
|
||||
|
||||
// Begin SPI transaction, set clock, bit order, data mode
|
||||
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
||||
spiConfig = SPISettings(spiClock, bitOrder, dataMode);
|
||||
|
|
|
@ -161,7 +161,6 @@
|
|||
}
|
||||
#endif // MARLIN_DEV_MODE
|
||||
|
||||
|
||||
#else
|
||||
|
||||
void calibrate_delay_loop() {}
|
||||
|
|
|
@ -50,7 +50,6 @@ void UnwInvalidateRegisterFile(RegData *regFile) {
|
|||
} while (t < 13);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the data used for unwinding.
|
||||
*/
|
||||
|
@ -129,7 +128,6 @@ bool UnwReportRetAddr(UnwState * const state, uint32_t addr) {
|
|||
return state->cb->report((void *)state->reportData, &entry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Write some register to memory.
|
||||
* This will store some register and meta data onto the virtual stack.
|
||||
|
|
|
@ -41,7 +41,6 @@ typedef enum {
|
|||
REG_VAL_ARITHMETIC = 0x80
|
||||
} RegValOrigin;
|
||||
|
||||
|
||||
/** Type for tracking information about a register.
|
||||
* This stores the register value, as well as other data that helps unwinding.
|
||||
*/
|
||||
|
@ -56,7 +55,6 @@ typedef struct {
|
|||
int o; /* (RegValOrigin) */
|
||||
} RegData;
|
||||
|
||||
|
||||
/** Structure used to track reads and writes to memory.
|
||||
* This structure is used as a hash to store a small number of writes
|
||||
* to memory.
|
||||
|
@ -81,7 +79,6 @@ typedef struct {
|
|||
uint8_t tracked[(MEM_HASH_SIZE + 7) / 8];
|
||||
} MemData;
|
||||
|
||||
|
||||
/** Structure that is used to keep track of unwinding meta-data.
|
||||
* This data is passed between all the unwinding functions.
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#if defined(__arm__) || defined(__thumb__)
|
||||
|
||||
|
||||
/*
|
||||
On ARM CPUs exception handling is quite powerful.
|
||||
|
||||
|
|
|
@ -615,7 +615,6 @@ void unified_bed_leveling::G29() {
|
|||
|
||||
#endif // UBL_DEVEL_DEBUGGING
|
||||
|
||||
|
||||
//
|
||||
// Load a Mesh from the EEPROM
|
||||
//
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
//todo: try faster I2C speed; tweak TWI_FREQ (400000L, or faster?); or just TWBR = ((CPU_FREQ / 400000L) - 16) / 2;
|
||||
//todo: consider Marlin-optimized Wire library; i.e. MarlinWire, like MarlinSerial
|
||||
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(I2C_POSITION_ENCODERS)
|
||||
|
@ -462,7 +461,6 @@ void I2CPositionEncoder::reset() {
|
|||
TERN_(I2CPE_ERR_ROLLING_AVERAGE, ZERO(err));
|
||||
}
|
||||
|
||||
|
||||
bool I2CPositionEncodersMgr::I2CPE_anyaxis;
|
||||
uint8_t I2CPositionEncodersMgr::I2CPE_addr,
|
||||
I2CPositionEncodersMgr::I2CPE_idx;
|
||||
|
|
|
@ -263,5 +263,4 @@ void FWRetract::M208_report() {
|
|||
|
||||
#endif // FWRETRACT_AUTORETRACT
|
||||
|
||||
|
||||
#endif // FWRETRACT
|
||||
|
|
|
@ -144,7 +144,6 @@ struct MeatpackSerial : public SerialBase <MeatpackSerial < SerialT >> {
|
|||
void flushTX() { CALL_IF_EXISTS(void, &out, flushTX); }
|
||||
SerialFeature features(serial_index_t index) const { return SerialFeature::MeatPack | CALL_IF_EXISTS(SerialFeature, &out, features, index); }
|
||||
|
||||
|
||||
int available(serial_index_t index) {
|
||||
if (charCount) return charCount; // The buffer still has data
|
||||
if (out.available(index) <= 0) return 0; // No data to read
|
||||
|
|
|
@ -28,11 +28,8 @@ Now we are sure MMU is available and ready. If there was a timeout or other comm
|
|||
- *Build number* is an integer value and has to be >=126, or =>132 if 12V mode is enabled
|
||||
- *FINDA status* is 1 if the filament is loaded to the extruder, 0 otherwise
|
||||
|
||||
|
||||
*Build number* is checked against the required value, if it does not match, printer is halted.
|
||||
|
||||
|
||||
|
||||
Toolchange
|
||||
==========
|
||||
|
||||
|
@ -54,7 +51,6 @@ When done, the MMU sends
|
|||
We don't wait for a response here but immediately continue with the next G-code which should
|
||||
be one or more extruder moves to feed the filament into the hotend.
|
||||
|
||||
|
||||
FINDA status
|
||||
============
|
||||
|
||||
|
@ -63,8 +59,6 @@ FINDA status
|
|||
|
||||
*FINDA status* is 1 if the is filament loaded to the extruder, 0 otherwise. This could be used as filament runout sensor if probed regularly.
|
||||
|
||||
|
||||
|
||||
Load filament
|
||||
=============
|
||||
|
||||
|
@ -74,7 +68,6 @@ MMU will feed filament down to the extruder, when done
|
|||
|
||||
- MMU => 'ok\n'
|
||||
|
||||
|
||||
Unload filament
|
||||
=============
|
||||
|
||||
|
@ -84,8 +77,6 @@ MMU will retract current filament from the extruder, when done
|
|||
|
||||
- MMU => 'ok\n'
|
||||
|
||||
|
||||
|
||||
Eject filament
|
||||
==============
|
||||
|
||||
|
|
|
@ -341,7 +341,6 @@ class FilamentSensorBase {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
/********************************* RESPONSE TYPE *********************************/
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#define PCT_TO_PWM(X) ((X) * 255 / 100)
|
||||
#define PCT_TO_SERVO(X) ((X) * 180 / 100)
|
||||
|
||||
|
||||
// Laser/Cutter operation mode
|
||||
enum CutterMode : int8_t {
|
||||
CUTTER_MODE_ERROR = -1,
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
void stepper_driver_backward_check();
|
||||
|
|
|
@ -74,7 +74,6 @@ class TWIBus {
|
|||
*/
|
||||
uint8_t buffer[TWIBUS_BUFFER_SIZE];
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Target device address
|
||||
|
|
|
@ -449,7 +449,6 @@ static const hd44780_charmap_t g_hd44780_charmap_device[] PROGMEM = {
|
|||
{IV('⭢'), 0xC7, 0},
|
||||
{IV('⭣'), 0xC6, 0},
|
||||
|
||||
|
||||
{IV('⯆'), 0xF5, 0},
|
||||
{IV('⯇'), 0xF7, 0}, // ⯅
|
||||
{IV('⯈'), 0xF6, 0},
|
||||
|
@ -500,7 +499,6 @@ static const hd44780_charmap_t g_hd44780_charmap_device[] PROGMEM = {
|
|||
//{IV(''), 0x9E, 0},
|
||||
//{IV(''), 0x9F, 0},
|
||||
|
||||
|
||||
{IV('¼'), 0xF0, 0}, // 00BC
|
||||
{IV('⅓'), 0xF1, 0},
|
||||
{IV('½'), 0xF2, 0}, // 00BD
|
||||
|
|
|
@ -446,7 +446,6 @@ static const TFTGLCD_charmap_t g_TFTGLCD_charmap_device[] PROGMEM = {
|
|||
{IV('⭢'), 0xC7, 0},
|
||||
{IV('⭣'), 0xC6, 0},
|
||||
|
||||
|
||||
{IV('⯆'), 0xF5, 0},
|
||||
{IV('⯇'), 0xF7, 0}, // ⯅
|
||||
{IV('⯈'), 0xF6, 0},
|
||||
|
|
|
@ -103,7 +103,6 @@ public:
|
|||
void init(uint8_t cs, uint8_t rs, uint8_t reset=U8G_PIN_NONE) { U8GLIB::init(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset); }
|
||||
};
|
||||
|
||||
|
||||
extern u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini12864_HAL_2x_hw_spi;
|
||||
|
||||
class U8GLIB_MINI12864_2X_HAL : public U8GLIB {
|
||||
|
|
|
@ -376,7 +376,6 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co
|
|||
|
||||
#define BAR_TALL (STATUS_HEATERS_HEIGHT - 2)
|
||||
|
||||
|
||||
// Draw a heating progress bar, if specified
|
||||
#if ANY(STATUS_HEAT_PERCENT, STATUS_HEAT_POWER)
|
||||
uint8_t tall = 0;
|
||||
|
|
|
@ -230,12 +230,10 @@ uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t
|
|||
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
|
||||
}
|
||||
|
||||
|
||||
uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
|
||||
u8g_pb_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf};
|
||||
u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire = { u8g_dev_ssd1306_128x64_2x_2_wire_fn, &u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL };
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This routine adds the instruction byte in between the command bytes. This makes the init
|
||||
|
|
|
@ -234,7 +234,6 @@ uint8_t u8g_dev_st7565_64128n_HAL_2x_buf[WIDTH*2] U8G_NOCOMMON ;
|
|||
u8g_pb_t u8g_dev_st7565_64128n_HAL_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_st7565_64128n_HAL_2x_buf};
|
||||
u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_sw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_SW_SPI_FN };
|
||||
|
||||
|
||||
U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_hw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_HW_SPI_FN);
|
||||
u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
|
||||
|
||||
|
|
|
@ -84,19 +84,19 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = {
|
|||
void clear_graphics_DRAM(u8g_t *u8g, u8g_dev_t *dev) {
|
||||
u8g_SetChipSelect(u8g, dev, 1);
|
||||
u8g_Delay(1);
|
||||
u8g_SetAddress(u8g, dev, 0); // cmd mode
|
||||
u8g_WriteByte(u8g, dev, 0x08); //display off, cursor+blink off
|
||||
u8g_WriteByte(u8g, dev, 0x3E); //extended mode + GDRAM active
|
||||
for (uint8_t y = 0; y < (LCD_PIXEL_HEIGHT) / 2; ++y) { //clear GDRAM
|
||||
u8g_WriteByte(u8g, dev, 0x80 | y); //set y
|
||||
u8g_WriteByte(u8g, dev, 0x80); //set x = 0
|
||||
u8g_SetAddress(u8g, dev, 1); /* data mode */
|
||||
for (uint8_t i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; ++i) //2x width clears both segments
|
||||
u8g_SetAddress(u8g, dev, 0); // Cmd mode
|
||||
u8g_WriteByte(u8g, dev, 0x08); // Display off, cursor+blink off
|
||||
u8g_WriteByte(u8g, dev, 0x3E); // Extended mode + GDRAM active
|
||||
for (uint8_t y = 0; y < (LCD_PIXEL_HEIGHT) / 2; ++y) { // Clear GDRAM
|
||||
u8g_WriteByte(u8g, dev, 0x80 | y); // Set y
|
||||
u8g_WriteByte(u8g, dev, 0x80); // Set x = 0
|
||||
u8g_SetAddress(u8g, dev, 1); // Data mode
|
||||
for (uint8_t i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; ++i) // 2x width clears both segments
|
||||
u8g_WriteByte(u8g, dev, 0);
|
||||
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
|
||||
u8g_SetAddress(u8g, dev, 0); // Cmd mode
|
||||
}
|
||||
|
||||
u8g_WriteByte(u8g, dev, 0x0C); //display on, cursor+blink off
|
||||
u8g_WriteByte(u8g, dev, 0x0C); // Display on, cursor+blink off
|
||||
|
||||
u8g_SetChipSelect(u8g, dev, 0);
|
||||
}
|
||||
|
|
|
@ -162,7 +162,6 @@ inline void dwinDrawBox(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t
|
|||
void dwinFrameAreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
|
||||
uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd);
|
||||
|
||||
|
||||
/*---------------------------------------- Text related functions ----------------------------------------*/
|
||||
|
||||
// Draw a string
|
||||
|
|
|
@ -525,7 +525,6 @@ const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = {
|
|||
{IV('⭢'), 0xC7, 0},
|
||||
{IV('⭣'), 0xC6, 0},
|
||||
|
||||
|
||||
{IV('⯆'), 0xF5, 0},
|
||||
{IV('⯇'), 0xF7, 0}, // ⯅
|
||||
{IV('⯈'), 0xF6, 0},
|
||||
|
@ -576,7 +575,6 @@ const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = {
|
|||
//{IV(''), 0x9E, 0},
|
||||
//{IV(''), 0x9F, 0},
|
||||
|
||||
|
||||
{IV('¼'), 0xF0, 0}, // 00BC
|
||||
{IV('⅓'), 0xF1, 0},
|
||||
{IV('½'), 0xF2, 0}, // 00BD
|
||||
|
|
|
@ -281,7 +281,6 @@
|
|||
#define KEY_LEVEL_DEC 2
|
||||
#define KEY_LEVEL_ENSURE 4
|
||||
|
||||
|
||||
#define KEY_PREPARE_TO_PREHEAT 3
|
||||
#define KEY_PREHEAT_TO_PREPARE 1
|
||||
#define KEY_PREHEAT_PLA 2
|
||||
|
|
|
@ -241,7 +241,6 @@ enum DGUS_ScreenID : uint8_t {
|
|||
DGUS_SCREEN_UNUSED = 255
|
||||
};
|
||||
|
||||
|
||||
// Place for status messages.
|
||||
constexpr uint16_t VP_M117 = 0x7020;
|
||||
constexpr uint8_t VP_M117_LEN = 0x20;
|
||||
|
@ -299,7 +298,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
|||
constexpr uint16_t VP_MARLIN_VERSION = 0x1A00;
|
||||
constexpr uint8_t VP_MARLIN_VERSION_LEN = 16; // there is more space on the display, if needed.
|
||||
|
||||
|
||||
constexpr uint16_t VP_SCREENCHANGE_ASK = 0x1500;
|
||||
constexpr uint16_t VP_SCREENCHANGE = 0x1501; // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte.
|
||||
constexpr uint16_t VP_TEMP_ALL_OFF = 0x1502; // Turn all heaters off. Value arbitrary ;)=
|
||||
|
@ -515,7 +513,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
|||
constexpr uint16_t VP_TMC_E1_Current = 0x3442;
|
||||
constexpr uint16_t VP_TMC_Z1_Current = 0x3444;
|
||||
|
||||
|
||||
constexpr uint16_t VP_PrintTime_H = 0x3500;
|
||||
constexpr uint16_t VP_PrintTime_M = 0x3502;
|
||||
constexpr uint16_t VP_PrintTime_S = 0x3504;
|
||||
|
@ -591,7 +588,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
|||
constexpr uint16_t VP_Level_Point_Five_X = 0x4110;
|
||||
constexpr uint16_t VP_Level_Point_Five_Y = 0x4112;
|
||||
|
||||
|
||||
/* H43 Version */
|
||||
constexpr uint16_t VP_MKS_H43_VERSION = 0x4A00; // MKS H43 V1.0.0
|
||||
constexpr uint16_t VP_MKS_H43_VERSION_LEN = 16;
|
||||
|
@ -630,7 +626,6 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
|||
constexpr uint16_t VP_E0_Max_Acc_Speed_Dis = 0x5210;
|
||||
constexpr uint16_t VP_E1_Max_Acc_Speed_Dis = 0x5220;
|
||||
|
||||
|
||||
constexpr uint16_t VP_PrintTime_Dis = 0x5470;
|
||||
constexpr uint16_t VP_E0_Temp_Dis = 0x5310;
|
||||
constexpr uint16_t VP_E1_Temp_Dis = 0x5320;
|
||||
|
@ -641,12 +636,10 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
|||
|
||||
constexpr uint16_t VP_Min_Ex_Temp_Dis = 0x5380;
|
||||
|
||||
|
||||
constexpr uint16_t VP_X_PARK_POS_Dis = 0x53E0;
|
||||
constexpr uint16_t VP_Y_PARK_POS_Dis = 0x53F0;
|
||||
constexpr uint16_t VP_Z_PARK_POS_Dis = 0x5400;
|
||||
|
||||
|
||||
constexpr uint16_t VP_TravelAcc_Dis = 0x5440;
|
||||
constexpr uint16_t VP_FeedRateMin_Dis = 0x5450;
|
||||
constexpr uint16_t VP_TravelFeeRateMin_Dis = 0x5460;
|
||||
|
|
|
@ -153,7 +153,6 @@ constexpr DGUS_Addr LIST_CONTROL[] PROGMEM = {
|
|||
DGUS_Addr::END
|
||||
};
|
||||
|
||||
|
||||
constexpr DGUS_Addr LIST_ADJUST[] PROGMEM = {
|
||||
DGUS_Addr::ADJUST_Icon_Adjust,
|
||||
DGUS_Addr::IO_Icon_ExtruderTemp,
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
|
||||
/********************************* DL CACHE SLOTS ******************************/
|
||||
|
||||
// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
|
||||
|
|
|
@ -38,7 +38,6 @@ void StatisticsScreen::onRedraw(draw_mode_t what) {
|
|||
if (what & BACKGROUND) {
|
||||
char buffer[21];
|
||||
|
||||
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
|
|
|
@ -248,7 +248,6 @@
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
/* this data is used to patch FT813 displays that use a GT911 as a touch-controller */
|
||||
#ifdef PATCH_GT911
|
||||
constexpr PROGMEM unsigned char GT911_data[] = {
|
||||
|
|
|
@ -71,7 +71,6 @@ void UIData::set_persistent_data(uint8_t value) {
|
|||
flags.value = value & get_persistent_data_mask();
|
||||
}
|
||||
|
||||
|
||||
void UIData::enable_touch_sounds(bool enabled) {
|
||||
UIData::flags.bits.touch_start_sound = enabled;
|
||||
UIData::flags.bits.touch_end_sound = enabled;
|
||||
|
|
|
@ -100,7 +100,6 @@ const uint8_t cyrillic_font_widths[] PROGMEM = {
|
|||
21, // ё
|
||||
};
|
||||
|
||||
|
||||
/* This is a dump of "font_bitmaps/cyrillic_char_set_bitmap_31.png"
|
||||
* using the tool "bitmap2cpp.py". The tool converts the image into
|
||||
* 16-level grayscale and packs two pixels per byte. The resulting
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
* location: <https://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "../../../../MarlinCore.h"
|
||||
#if ENABLED(TOUCH_UI_FTDI_EVE)
|
||||
#include "language.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "screens.h"
|
||||
tiny_timer_t refresh_timer;
|
||||
|
||||
|
||||
/**
|
||||
* DECL_SCREEN_IF_INCLUDED allows for a concise
|
||||
* definition of SCREEN_TABLE:
|
||||
|
|
|
@ -165,7 +165,6 @@ namespace Theme {
|
|||
{ORGAN, NOTE_A4, 4},
|
||||
{SILENCE, REST, 36},
|
||||
|
||||
|
||||
{ORGAN, NOTE_C5S, 4},
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
|
|
|
@ -91,7 +91,6 @@ void FileNavigator::getFiles(uint16_t index) {
|
|||
}
|
||||
lastindex = index;
|
||||
|
||||
|
||||
// Clear currently drawn screen
|
||||
for (int i = 0; i < DISPLAY_FILES; i++) {
|
||||
for (int j = 0; j < 20; j++)
|
||||
|
|
|
@ -106,7 +106,6 @@ void set_lcd_error(FSTR_P const error, FSTR_P const component/*=nullptr*/) {
|
|||
write_to_lcd(F("}"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Process an LCD 'C' command.
|
||||
* These are currently all temperature commands
|
||||
|
|
|
@ -158,7 +158,6 @@ void SPIFlashStorage::beginWrite(const uint32_t startAddress) {
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void SPIFlashStorage::endWrite() {
|
||||
// Flush remaining data
|
||||
#if HAS_SPI_FLASH_COMPRESSION
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
void lv_draw_wifi();
|
||||
void lv_clear_wifi();
|
||||
void disp_wifi_state();
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
void lv_draw_wifi_tips();
|
||||
void lv_clear_wifi_tips();
|
||||
|
||||
|
|
|
@ -154,7 +154,6 @@
|
|||
#define FILAMENT_DIALOG_LOAD_COMPLETE_TIPS_FR "Chargement terminé,\n<confirmez> pour revenir!"
|
||||
#define FILAMENT_DIALOG_UNLOAD_COMPLETE_TIPS_FR "Déchargement terminé,\n<confirmez> pour revenir!"
|
||||
|
||||
|
||||
#define PRE_HEAT_EXT_TEXT_FR "E"
|
||||
#define PRE_HEAT_BED_TEXT_FR "Bed"
|
||||
|
||||
|
|
|
@ -40,11 +40,7 @@ void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * co
|
|||
bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
|
||||
bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
|
||||
|
||||
void LCD_Clear(uint16_t color);
|
||||
void tft_set_point(uint16_t x, uint16_t y, uint16_t point);
|
||||
void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t height);
|
||||
void LCD_WriteRAM_Prepare();
|
||||
void lcd_draw_logo();
|
||||
void lcdClear(uint16_t color);
|
||||
void lv_encoder_pin_init();
|
||||
void lv_update_encoder();
|
||||
|
||||
|
|
|
@ -467,7 +467,6 @@ namespace LanguageNarrow_pl {
|
|||
|
||||
LSTR MSG_GAMES = _UxGT("Gry");
|
||||
|
||||
|
||||
LSTR MSG_EDIT_PASSWORD = _UxGT("Zmień hasło");
|
||||
LSTR MSG_LOGIN_REQUIRED = _UxGT("Wymagane zalogowanie");
|
||||
LSTR MSG_PASSWORD_SETTINGS = _UxGT("Ustawienia hasła");
|
||||
|
|
|
@ -44,22 +44,18 @@
|
|||
// Kanji (an other Japanese symbol set) uses far more than two codepages. So currently I don't see a chance to map the Unicodes. Its not
|
||||
// impossible to have a close to direct mapping but will need giant conversion tables and fonts (we don't want to have in a embedded system).
|
||||
|
||||
|
||||
// Select the better font for full graphic displays.
|
||||
//#define DISPLAY_CHARSET_ISO10646_1
|
||||
//#define DISPLAY_CHARSET_ISO10646_5
|
||||
//#define DISPLAY_CHARSET_ISO10646_GREEK
|
||||
//#define DISPLAY_CHARSET_ISO10646_KANA
|
||||
|
||||
|
||||
|
||||
// next 5 lines select variants in this file only
|
||||
#define DISPLAYTEST
|
||||
//#define WEST
|
||||
//#define CYRIL
|
||||
//#define KANA
|
||||
|
||||
|
||||
// TESTSTRINGS
|
||||
|
||||
#define STRG_ASCII_2 _UxGT(" !\"#$%&'()*+,-./")
|
||||
|
|
|
@ -638,7 +638,6 @@ namespace LanguageNarrow_uk {
|
|||
LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Не забудь зберегти!");
|
||||
LSTR MSG_PASSWORD_REMOVED = _UxGT("Пароль видалений");
|
||||
|
||||
|
||||
//
|
||||
// Filament Change screens show up to 2 lines on a 3-line display
|
||||
//
|
||||
|
|
|
@ -193,7 +193,6 @@ inline void reset_invaders() {
|
|||
reset_bullets();
|
||||
}
|
||||
|
||||
|
||||
inline void spawn_ufo() {
|
||||
idat.ufov = random(0, 2) ? 1 : -1;
|
||||
idat.ufox = idat.ufov > 0 ? -(UFO_W) : LCD_PIXEL_WIDTH - 1;
|
||||
|
|
|
@ -45,7 +45,6 @@ extern const uint8_t Helvetica_Symbols_19[45] = {
|
|||
8,7,7,9,0,11,60,102,195,195,195,102,60,
|
||||
};
|
||||
|
||||
|
||||
// Helvetica, capital 'A' height: 19px
|
||||
extern const uint8_t Helvetica_19[7298] = {
|
||||
129,19,32,0,255,0,24,251, // unifont_t
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
The SIL Open Font License version 1.1 is copied below, and is also
|
||||
available with a FAQ at http://scripts.sil.org/OFL.
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
|
|
@ -40,7 +40,6 @@ unifont_t *TFT_String::font_header;
|
|||
uint16_t TFT_String::extra_count;
|
||||
#endif
|
||||
|
||||
|
||||
uint16_t TFT_String::data[];
|
||||
uint16_t TFT_String::span;
|
||||
uint8_t TFT_String::length;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue