Prusa MINI Firmware overview
|
Go to the documentation of this file.
8 #define MINIMAL_REQUEST_LENGTH 14 // GET / HTTP/1.0
10 #define memshift(ptr, size) \
11 (reinterpret_cast<const void *>(reinterpret_cast<size_t>(ptr) + size))
12 #define chrshift(ptr, size) \
13 (reinterpret_cast<const char *>(reinterpret_cast<size_t>(ptr) + size))
16 #define memlen(start, end) \
17 (reinterpret_cast<size_t>(end) - reinterpret_cast<size_t>(start) + 1)
39 static void *
operator new(
size_t size) noexcept {
40 if (Context::instances == Context::MAX) {
51 static void operator delete(
void *ptr) {
60 ,
message({
nullptr,
nullptr,
nullptr, 0 })
65 , request_buffer(
nullptr)
66 , request_buffer_size(0) {
73 tcp_arg(this->pcb,
nullptr);
102 char *request_buffer;
103 uint16_t request_buffer_size;
106 err_t parse_request_line(
const void *line,
size_t length);
109 err_t parse_header(
const void *line,
size_t length);
static void rop_rgb888_disabled(uint8_t *ppx888)
Definition: st7789v.c:607
uint32_t gui_timers_cycle(void)
Definition: gui_timer.c:98
#define RENDER_FLG(a, r)
Definition: display_helper.h:10
uint32_t OwnAddress2
Definition: stm32f4xx_hal_i2c.h:80
void window_set_max(int16_t id, float max)
Definition: window.c:704
DRESULT USBH_read(BYTE, BYTE *, DWORD, UINT)
Reads Sector(s)
Definition: usbh_diskio.c:135
uint32_t PeriphDataAlignment
Definition: stm32f4xx_hal_dma.h:80
#define GPIO_PIN_6
Definition: stm32f4xx_hal_gpio.h:108
uint8_t pinEN2
Definition: jogwheel.h:22
void gui_timers_delete_by_window_id(int16_t win_id)
Definition: gui_timer.c:91
#define RCC_PLLP_DIV2
Definition: stm32f4xx_hal_rcc.h:186
void() window_draw_t(void *window)
Definition: window.h:57
#define FLG_RST
Definition: st7789v.c:73
#define WINDOW_MAX_USERCLS
Definition: window.c:8
void window_set_min_max(int16_t id, float min, float max)
Definition: window.c:748
static void st7789v_set_rs(void)
Definition: st7789v.c:117
padding_ui8_t padding
Definition: window_numb.h:24
#define WINDOW_EVENT_CAPT_0
Definition: window.h:44
#define USB_DESC_TYPE_STRING
Definition: usbd_def.h:97
window_t * window_ptr(int16_t id)
Definition: window.c:82
Header for fatfs applications.
#define MSGBOX_RES_CANCEL
Definition: window_msgbox.h:40
#define GPIO_MODE_AF_PP
Definition: stm32f4xx_hal_gpio.h:138
Definition: window_text.h:15
int8_t gui_timer_create_timeout(uint32_t ms, int16_t win_id)
Definition: gui_timer.c:74
#define UART_OVERSAMPLING_16
Definition: stm32f4xx_hal_uart.h:276
st7789v_config_t st7789v_config
Definition: st7789v.c:905
#define BUZZER_GPIO_Port
Definition: main.h:100
int window_is_enabled(int16_t id)
Definition: window.c:257
HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
#define DMA_CHANNEL_0
Definition: stm32f4xx_hal_dma.h:218
Definition: usbd_def.h:189
const char items[11][6]
Definition: window_list.c:5
struct _window_text_t window_text_t
USBH_StatusTypeDef USBH_LL_DeInit(USBH_HandleTypeDef *phost)
De-Initialize the low level portion of the host driver.
Definition: usbh_conf.c:221
osThreadId idleTaskHandle
Definition: main.c:99
#define LCD_RS_Pin
Definition: main.h:141
uint8_t direction
Definition: UsbCore.h:185
uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint16_t length)
USBD_CDC_SetTxBuffer.
Definition: usbd_cdc.c:810
DMA_HandleTypeDef hdma_spi2_tx
Definition: main.c:83
uint8_t attr
Definition: term.h:49
#define GET_SECTOR_COUNT
Definition: onboard_sd.h:63
void render_text_align(rect_ui16_t rc, const char *text, font_t *font, color_t clr0, color_t clr1, padding_ui8_t padding, uint16_t flags)
Definition: display_helper.c:6
Definition: onboard_sd.h:27
#define WINDOW_EVENT_CAPT_1
Definition: window.h:45
#define FAN1_Pin
Definition: main.h:115
void window_set_step(int16_t id, float step)
Definition: window.c:726
#define E_DIR_Pin
Definition: main.h:135
void window_msgbox_done(window_msgbox_t *window)
Definition: window_msgbox.c:155
uint16_t resource_size(uint16_t id)
Definition: guitypes.c:174
uint32_t HAL_RCC_GetPCLK1Freq(void)
static void rop_rgb888_invert(uint8_t *ppx888)
Definition: st7789v.c:583
color_t color_text
Definition: window_progress.h:18
uint32_t PeriphInc
Definition: stm32f4xx_hal_dma.h:74
const float * range
Definition: window_menu.h:46
void window_set_icon_id(int16_t id, uint16_t id_res)
Definition: window.c:659
float min
Definition: window_spin.h:14
void st7789v_wr(uint8_t *pdata, uint16_t size)
Definition: st7789v.c:221
char TCHAR
Definition: ff.h:62
void window_list_done(window_list_t *window)
Definition: window_list.c:42
#define __HAL_RCC_USART6_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:639
int vterm_printf(term_t *pt, const char *fmt, va_list va)
Definition: term.c:191
void PNGAPI png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)
Definition: pngread.c:1005
#define USB_FS_N_Pin
Definition: main.h:161
const char * response
Definition: lwsapi_app.hpp:212
const char ** strings
Definition: window_menu.h:55
uint32_t FIFOMode
Definition: stm32f4xx_hal_dma.h:94
IWDG_HandleTypeDef hiwdg
Definition: main.c:79
uint32_t BreakState
Definition: stm32f4xx_hal_tim_ex.h:104
#define SPI_FIRSTBIT_MSB
Definition: stm32f4xx_hal_spi.h:251
#define SPI_BAUDRATEPRESCALER_2
Definition: stm32f4xx_hal_spi.h:236
uint32_t Period
Definition: stm32f4xx_hal_tim.h:71
#define CMD_DISPON
Definition: st7789v.c:24
USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost)
Return the USB host speed from the low level driver.
Definition: usbh_conf.c:314
int16_t window_capture(void)
Definition: window.c:169
#define DMA_PRIORITY_MEDIUM
Definition: stm32f4xx_hal_dma.h:309
#define FAN0_TACH_Pin
Definition: main.h:117
void gui_timer_reset(int8_t id)
Definition: gui_timer.c:133
void st7789v_ctrl_set(uint8_t ctrl)
#define UART_HWCONTROL_NONE
Definition: stm32f4xx_hal_uart.h:246
void StartWebServerTask(void const *argument)
Function implementing the webServerTask thread.
Definition: main.c:1013
Definition: guitypes.h:106
IResponse::unique_ptr_t api_job(Environment &env)
return coroutine_fn for /api/job request
Definition: connect.cpp:211
void st7789v_gamma_set(uint8_t gamma)
uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev)
USBD_CDC_ReceivePacket prepare OUT Endpoint for reception.
Definition: usbd_cdc.c:883
void st7789v_cmd_madctl(uint8_t madctl)
Definition: st7789v.c:251
err_t ethernetif_init(struct netif *netif)
Definition: ethernetif.c:560
void term_write_escape_char(term_t *pt, uint8_t ch)
Definition: term.c:128
uint16_t y
Definition: guitypes.h:71
window_class_t cls
Definition: window_numb.h:14
uint16_t size
Definition: window.h:69
uint8_t h
Definition: guitypes.h:78
#define HOST_USER_SELECT_CONFIGURATION
Definition: usbh_core.h:64
#define USBD_CONFIGURATION_STRING_FS
Definition: usbd_desc.c:100
USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Flushes an endpoint of the Low Level Driver.
Definition: usbd_conf.c:484
#define ALIGN_BOTTOM
Definition: guitypes.h:16
uint32_t ContinuousConvMode
Definition: stm32f4xx_hal_adc.h:97
int count
Definition: window_list.h:23
#define FONT_FLG_SWAP
Definition: guitypes.h:36
ADC_TypeDef * Instance
Definition: stm32f4xx_hal_adc.h:210
float window_get_step(int16_t id)
Definition: window.c:738
State state
Definition: connection.hpp:30
Header file of TIM HAL module.
uint16_t h
Definition: display.h:26
color_t color_back
Definition: window_progress.h:17
#define TIM_OCNPOLARITY_HIGH
Definition: stm32f4xx_hal_tim.h:395
int16_t window_register_class(window_class_t *cls)
Definition: window.c:90
void gui_timers_delete_by_window_id(int16_t win_id)
Definition: gui_timer.c:91
uint16_t w
Definition: guitypes.h:72
const uint8_t status_heatbed_svg[]
Definition: status_heatbed_svg.c:3
#define CMD_RAMWR
Definition: st7789v.c:27
void window_list_inc(window_list_t *window, int dif)
Definition: window_list.c:120
void window_numb_init(window_numb_t *window)
Definition: window_numb.c:7
Definition: usbd_def.h:201
screen_event_t * event
Definition: screen.h:24
void netif_set_up(struct netif *netif)
Definition: netif.c:624
bool done
Definition: connect.cpp:123
#define GPIO_MODE_OUTPUT_PP
Definition: stm32f4xx_hal_gpio.h:136
static color_t color_alpha(color_t clr0, color_t clr1, uint8_t alpha)
Definition: guitypes.h:141
#define Z_DIAG_Pin
Definition: main.h:87
uint8_t st7789v_inversion_get(void)
int16_t id_parent
Definition: window.h:78
void st7789v_clip_rect(rect_ui16_t rc)
Definition: st7789v.c:434
void gui_free(void *ptr)
Definition: gui.c:39
Definition: guitypes.h:76
uint8_t bottom
Definition: guitypes.h:90
USBH_StatusTypeDef USBH_LL_SubmitURB(USBH_HandleTypeDef *phost, uint8_t pipe, uint8_t direction, uint8_t ep_type, uint8_t token, uint8_t *pbuff, uint16_t length, uint8_t do_ping)
Submit a new URB to the low level driver.
Definition: usbh_conf.c:475
int _lseek(int file, int ptr, int dir)
Definition: syscalls.c:139
int16_t cls_id
Definition: window.h:68
Definition: stm32f4xx_hal_def.h:59
int16_t window_prev_enabled(int16_t id)
Definition: window.c:204
HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)
Message_t message
Definition: connection.hpp:32
#define THERM_1_Pin
Definition: main.h:103
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim)
Definition: stm32f4xx_hal_msp.c:430
void st7789v_brightness_disable(void)
#define LCD_SW2_Pin
Definition: main.h:129
void netif_set_down(struct netif *netif)
Definition: netif.c:682
point_ui16_t font_meas_text(font_t *pf, const char *str)
Definition: guitypes.c:97
: Header for usb_device.c file.
USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev)
USBD_Start Start the USB Device Core.
Definition: usbd_core.c:181
void st7789v_gamma_set_direct(uint8_t gamma_enu)
void NMI_Handler(void)
This function handles Non maskable interrupt.
Definition: stm32f4xx_it.c:96
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim)
Definition: stm32f4xx_hal_msp.c:430
void window_list_init(window_list_t *window)
Definition: window_list.c:28
static void MX_USART2_UART_Init(void)
USART2 Initialization Function.
Definition: main.c:743
#define HOST_USER_CLASS_ACTIVE
Definition: usbh_core.h:65
Definition: connection.hpp:24
void window_list_dec(window_list_t *window, int dif)
Definition: window_list.c:145
void term_write_char(term_t *pt, uint8_t ch)
Definition: term.c:157
static FORCE_INLINE int16_t degTargetHotend(const uint8_t E_NAME)
Definition: temperature.h:562
#define MSGBOX_GREY_FRAME
Definition: window_msgbox.h:58
void OTG_HS_IRQHandler(void)
This function handles USB On The Go HS global interrupt.
Definition: stm32f4xx_it.c:297
#define osThreadDef(name, thread, priority, instances, stacksz)
Definition: cmsis_os.h:468
Definition: stm32f4xx_hal_def.h:57
struct _window_icon_t window_icon_t
err_t lwsapi_init(void)
Init (start) the LwIP WSAPI server.
Definition: lwsapi.cpp:413
const uint8_t index_js[]
Definition: index_js.c:3
uint8_t row
Definition: term.h:51
static void MX_USART1_UART_Init(void)
USART1 Initialization Function.
Definition: main.c:713
void st7789v_cmd_dispon(void)
Definition: st7789v.c:259
#define MSGBOX_SHI_CHG
Definition: window_msgbox.h:17
USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
Starts the low level portion of the device driver.
Definition: usbd_conf.c:355
Header file for usbh_core.c.
void jogwheel_update_1ms(void)
Definition: jogwheel.c:22
ip4_addr_t ipaddr
Definition: lwip.c:73
screen_t * screen_0
Definition: screen.c:10
uint32_t f_enabled
Definition: window.h:86
#define GPIO_SPEED_FREQ_HIGH
Definition: stm32f4xx_hal_gpio.h:160
void window_msgbox_draw_buttons(window_msgbox_t *window)
Definition: window_msgbox.c:70
void uartrxbuff_init(uartrxbuff_t *prxbuff, UART_HandleTypeDef *phuart, DMA_HandleTypeDef *phdma, uint8_t size, uint8_t *pdata)
Definition: uartrxbuff.c:15
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
Period elapsed callback in non blocking mode.
Definition: main.c:1033
void ethernetif_update_config(struct netif *netif)
void window_numb_draw(window_numb_t *window)
Definition: window_numb.c:17
#define RCC_HCLK_DIV2
Definition: stm32f4xx_hal_rcc.h:260
uint32_t PLLP
Definition: stm32f4xx_hal_rcc_ex.h:78
void HAL_IncTick(void)
This function is called to increment a global variable "uwTick" used as application time base.
Definition: stm32f4xx_hal.c:328
rect_ui16_t st7789v_clip
Definition: st7789v.c:84
#define MSGBOX_MSK_BTN
Definition: window_msgbox.h:9
#define TIM_OCFAST_DISABLE
Definition: stm32f4xx_hal_tim.h:377
#define TERM_PRINTF_MAX
Definition: term.h:38
ApplicationTypeDef Appli_state
Definition: usb_host.c:75
static int is_interrupt(void)
Definition: st7789v.c:142
#define MSGBOX_SHI_BTN
Definition: window_msgbox.h:15
void st7789v_reset(void)
Definition: st7789v.c:312
Definition: window_progress.h:11
char uart6slave_line[32]
Definition: main.c:150
void st7789v_delay_ms(uint32_t ms)
Definition: st7789v.c:146
HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OC_InitTypeDef *sConfig, uint32_t Channel)
void term_write_LF(term_t *pt)
Definition: term.c:139
int16_t screen_stack_pop(void)
Definition: screen.c:55
void st7789v_draw_text(rect_ui16_t rc, const char *str, font_t *pf, color_t clr0, color_t clr1)
Definition: st7789v.c:562
#define WINDOW_NUMB_MAX_TEXT
Definition: window_numb.c:5
Definition: window_frame.h:18
uint8_t rows
Definition: term.h:45
void USBD_LL_Delay(uint32_t Delay)
Delays routine for the USB Device Library.
Definition: usbd_conf.c:739
display_draw_char_t * draw_char
Definition: display.h:34
RCC System, AHB and APB busses clock configuration structure definition.
Definition: stm32f4xx_hal_rcc.h:93
#define COLOR_WHITE
Definition: guitypes.h:41
static uint8_t uart1rx_data[200]
Definition: main.c:145
TIM_HandleTypeDef htim2
Definition: main.c:86
USBH_StatusTypeDef USBH_MSC_Write(USBH_HandleTypeDef *phost, uint8_t lun, uint32_t address, uint8_t *pbuf, uint32_t length)
USBH_MSC_Write The function performs a Write operation.
Definition: usbh_msc.c:748
float window_get_max(int16_t id)
Definition: window.c:716
void initialise_monitor_handles()
Definition: syscalls.c:68
TaskHandle_t osThreadId
Definition: cmsis_os.h:283
uint8_t jogwheel_changed
Definition: jogwheel.c:14
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
int16_t window_id(window_t *ptr)
Definition: window.c:86
const window_class_msgbox_t window_class_msgbox
Definition: window_msgbox.c:249
static int8_t CDC_DeInit_FS(void)
DeInitializes the CDC media low layer.
Definition: usbd_cdc_if.c:200
#define TERM_FLG_ESCAPE
Definition: term.h:30
static void MX_ADC1_Init(void)
ADC1 Initialization Function.
Definition: main.c:336
padding_ui8_t padding
Definition: window_msgbox.h:73
UART_HandleTypeDef huart2
Definition: main.c:91
Definition: onboard_sd.h:25
int _getpid(void)
Definition: syscalls.c:71
void window_spin_dec(window_spin_t *window, int dif)
Definition: window_spin.c:50
int HAL_PWM_Initialized
Definition: main.c:106
uint8_t uart6rx_data[32]
Definition: main.c:148
color_t color_text
Definition: guitypes.h:108
uint32_t delay
Definition: gui_timer.c:20
DMA_Stream_TypeDef * Instance
Definition: stm32f4xx_hal_dma.h:157
void * png_voidp
Definition: pngconf.h:577
#define SPI_DIRECTION_2LINES
Definition: stm32f4xx_hal_spi.h:189
uint8_t top
Definition: guitypes.h:88
void window_set_value(int16_t id, float value)
Definition: window.c:363
void st7789v_rd(uint8_t *pdata, uint16_t size)
Definition: st7789v.c:234
uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Returns the last transfered packet size.
Definition: usbd_conf.c:696
const uint16_t resource_table_size
#define USB_HS_N_Pin
Definition: main.h:131
char ** environ
Definition: syscalls.c:65
uint16_t id_res
Definition: window_icon.h:14
uint16_t screen_count
Definition: screen.c:13
void window_icon_draw(window_icon_t *window)
Definition: window_icon.c:11
void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
SPI MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:252
#define LOBYTE(x)
Definition: usbd_def.h:263
SPI_TypeDef * Instance
Definition: stm32f4xx_hal_spi.h:122
void DebugMon_Handler(void)
This function handles Debug monitor.
Definition: stm32f4xx_it.c:160
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
void window_set_item_callback(int16_t id, window_list_item_t *fnc)
Definition: window.c:787
#define APP_RX_DATA_SIZE
Definition: usbd_cdc_if.c:100
uint8_t right
Definition: guitypes.h:89
uint8_t alignment
Definition: window_icon.h:15
: Header for usb_host.c file.
static void MX_TIM3_Init(void)
TIM3 Initialization Function.
Definition: main.c:631
int window_is_capture(int16_t id)
Definition: window.c:272
#define HOST_HS
Definition: usbh_conf.h:127
uint32_t f_timer
Definition: gui_timer.c:26
uint32_t Mode
Definition: stm32f4xx_hal_gpio.h:68
#define JOGWHEEL_FLG_2PULSES
Definition: jogwheel.h:11
uint32_t SYSCLKSource
Definition: stm32f4xx_hal_rcc.h:98
int8_t gui_menu_timeout_id
Definition: gui_timer.c:36
int HAL_IWDG_Reset
Definition: main.c:103
#define HIBYTE(x)
Definition: usbd_def.h:264
#define CMD_SLPOUT
Definition: st7789v.c:19
SPI handle Structure definition.
Definition: stm32f4xx_hal_spi.h:120
void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c)
I2C MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:190
#define ADC_EOC_SINGLE_CONV
Definition: stm32f4xx_hal_adc.h:386
Definition: jogwheel.h:20
#define __HAL_RCC_GPIOB_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:409
const char * HTTP_404
Definition: http_states.c:5
void screen_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: screen.c:103
int16_t window_parent(int16_t id)
Definition: window.c:173
#define VECT_TAB_OFFSET
Definition: system_stm32f4xx.c:108
void app_error(void)
Definition: appmain.cpp:145
const uint8_t status_filament_svg[]
Definition: status_filament_svg.c:3
#define GAMMA_CURVE0
Definition: st7789v.c:43
Definition: window_spin.h:21
header file for the usbd_cdc.c file.
void HAL_SuspendTick(void)
Suspend Tick increment.
Definition: stm32f4xx_hal_timebase_tim.c:114
void window_set_format(int16_t id, const char *format)
Definition: window.c:403
void DMA2_Stream1_IRQHandler(void)
This function handles DMA2 stream1 global interrupt.
Definition: stm32f4xx_it.c:245
color_t color_progress
Definition: window_progress.h:19
#define WINDOW_CLS_TERM
Definition: window.h:17
TIM Break and Dead time configuration Structure definition.
Definition: stm32f4xx_hal_tim_ex.h:94
#define X_ENA_Pin
Definition: main.h:183
uint32_t CLKPhase
Definition: stm32f4xx_hal_spi.h:77
#define ADC_SAMPLETIME_3CYCLES
Definition: stm32f4xx_hal_adc.h:370
void st7789v_clear(color_t clr)
Definition: st7789v.c:349
size_t done
Definition: connect.cpp:159
#define ADC_RESOLUTION_12B
Definition: stm32f4xx_hal_adc.h:284
Definition: window_spin.h:12
#define USB_OVERC_Pin
Definition: main.h:89
void term_scroll_up(term_t *pt)
Definition: term.c:114
font_t * font_title
Definition: window_msgbox.h:72
uint32_t OCIdleState
Definition: stm32f4xx_hal_tim.h:112
uint32_t f_timer
Definition: window.h:94
#define HOST_USER_DISCONNECTION
Definition: usbh_core.h:68
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c)
I2C MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:225
#define CDC_SET_LINE_CODING
Definition: usbd_cdc.h:76
USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass)
USBD_RegisterClass Link class driver to Device Core.
Definition: usbd_core.c:157
static void MX_TIM1_Init(void)
TIM1 Initialization Function.
Definition: main.c:510
void window_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: window.c:797
void st7789v_spi_tx_complete(void)
Definition: st7789v.c:927
void TIM8_TRG_COM_TIM14_IRQHandler(void)
This function handles TIM8 trigger and commutation interrupts and TIM14 global interrupt.
Definition: stm32f4xx_it.c:219
void * pcs
Definition: guitypes.h:81
const uint8_t favicon_ico[]
Definition: favicon_ico.c:3
void HAL_ADC_MspDeInit(ADC_HandleTypeDef *hadc)
ADC MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:158
Definition: uartslave.h:32
void MX_USB_HOST_Init(void)
USB Host initialization function.
Definition: usb_host.c:100
HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim)
#define WINDOW_CLS_NUMB
Definition: window.h:11
Definition: usbh_msc.h:102
USBH_HandleTypeDef hUSB_Host
void uartrxbuff_open(uartrxbuff_t *prxbuff)
Definition: uartrxbuff.c:24
int _close(int file)
Definition: syscalls.c:126
uint32_t ClockDivision
Definition: stm32f4xx_hal_tim.h:75
uint16_t jogwheel_button_down
Definition: jogwheel.c:13
#define MSGBOX_SHI_ICO
Definition: window_msgbox.h:14
uint8_t * USBD_FS_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the device descriptor.
Definition: usbd_desc.c:264
#define ADC_DATAALIGN_RIGHT
Definition: stm32f4xx_hal_adc.h:332
int8_t gui_timer_create_timeout(uint32_t ms, int16_t win_id)
Definition: gui_timer.c:74
void render_term(rect_ui16_t rc, term_t *pt, font_t *font, color_t clr0, color_t clr1)
Definition: window_term.c:13
#define __HAL_RCC_TIM1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:580
#define THERM_2_Pin
Definition: main.h:105
#define USB_LEN_LANGID_STR_DESC
Definition: usbd_def.h:63
#define DEVICE_FS
Definition: usbd_conf.h:111
SPI_HandleTypeDef * phspi
Definition: st7789v.h:20
IResponse::unique_ptr_t not_found(Environment &env)
return coroutine_fn for Not Found response
Definition: connect.cpp:277
IWDG Handle Structure definition.
Definition: stm32f4xx_hal_iwdg.h:76
Definition: onboard_sd.h:24
#define IWDG_PRESCALER_4
Definition: stm32f4xx_hal_iwdg.h:96
#define LCD_SW3_Pin
Definition: main.h:124
#define MAX_HTTP_REQUEST
LwIP WSAPI C/C++ implementation.
Definition: lwsapi_app.hpp:33
uint8_t term_get_char_at(term_t *pt, uint8_t col, uint8_t row)
Definition: term.c:51
#define GPIO_PIN_2
Definition: stm32f4xx_hal_gpio.h:104
uint8_t term_get_attr_at(term_t *pt, uint8_t col, uint8_t row)
Definition: term.c:71
int HAL_ADC_Initialized
Definition: main.c:105
static const FileHandler_t files[]
Array of files which could be responed by http.
Definition: connect.cpp:52
static void window_term_init(window_term_t *window)
Definition: window_term.c:5
#define FLG_RS
Definition: st7789v.c:72
#define MSGBOX_RES_CUSTOM1
Definition: window_msgbox.h:50
uint8_t st7789v_flg
Definition: st7789v.c:75
void window_set_tag(int16_t id, uint8_t tag)
Definition: window.c:329
#define WP2_Pin
Definition: main.h:191
void app_assert(uint8_t *file, uint32_t line)
Definition: appmain.cpp:149
uint8_t gamma
Definition: st7789v.h:28
struct _window_list_t window_list_t
Definition: window.h:60
#define TERM_FLG_CHANGED
Definition: term.h:29
font_t * font
Definition: window_numb.h:21
void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
Suspend callback. When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support ...
Definition: usbd_conf.c:218
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, TIM_MasterConfigTypeDef *sMasterConfig)
uint32_t OCNPolarity
Definition: stm32f4xx_hal_tim.h:103
PCD_HandleTypeDef hpcd_USB_OTG_FS
Definition: usbd_conf.c:69
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
Definition: main.c:922
uint8_t window_get_tag(int16_t id)
Definition: window.c:335
#define CDC_CLEAR_COMM_FEATURE
Definition: usbd_cdc.h:75
void jogwheel_init(void)
Definition: jogwheel.c:16
#define __HAL_RCC_TIM1_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:637
#define CMD_INVOFF
Definition: st7789v.c:20
void() gui_loop_cb_t(void)
Definition: gui.h:34
void * sio_fd_t
Definition: sio.h:48
void st7789v_set_pixel(point_ui16_t pt, color_t clr)
Definition: st7789v.c:364
#define SPI_TIMODE_DISABLE
Definition: stm32f4xx_hal_spi.h:260
void tcpip_init(tcpip_init_done_fn initfunc, void *arg)
Definition: tcpip.c:462
const window_class_progress_t window_class_progress
Definition: window_progress.c:61
virtual Message_t generator(const struct pbuf *input=nullptr) override
Response generator, iterative returns file data.
Definition: connect.cpp:106
void USBH_Delay(uint32_t Delay)
Delay routine for the USB Host Library.
Definition: usbh_conf.c:601
static void MX_SPI2_Init(void)
SPI2 Initialization Function.
Definition: main.c:440
#define WINDOW_EVENT_ENC_UP
Definition: window.h:41
I2C_HandleTypeDef hi2c1
Definition: main.c:77
#define Z_MIN_Pin
Definition: main.h:159
uartrxbuff_t uart1rxbuff
Definition: main.c:144
Definition: usb_host.h:89
#define USB_EN_GPIO_Port
Definition: main.h:92
#define ALIGN_CENTER
Definition: guitypes.h:19
#define MSGBOX_RES_NO
Definition: window_msgbox.h:45
IResponse::unique_ptr_t api_post(Environment &env)
return 200 OK when file is post right
Definition: connect.cpp:257
char request_uri[URI_LENGTH]
Definition: lwsapi_app.hpp:184
start
Definition: g29_auto.py:150
color_t color_text
Definition: window_numb.h:20
color_t color_back
Definition: window_text.h:17
Definition: window_text.h:11
FILE * resource_fopen(uint16_t id, const char *opentype)
Definition: guitypes.c:180
void window_invalidate(int16_t id)
Definition: window.c:304
#define GUI_MAX_TIMERS
Definition: gui_timer.c:8
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
void st7789v_spi_rd_bytes(uint8_t *pb, uint16_t size)
Definition: st7789v.c:183
int32_t jogwheel_encoder
Definition: jogwheel.c:10
int printf(const char *format...)
write string data to internal buffer
Definition: connect.cpp:131
void HAL_UART_MspInit(UART_HandleTypeDef *huart)
UART MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:550
Definition: usbd_def.h:197
#define WINDOW_FLG_PARENT
Definition: window.h:32
uint16_t x
Definition: guitypes.h:65
term_t * term
Definition: window_term.h:20
uint32_t OCPolarity
Definition: stm32f4xx_hal_tim.h:100
uint32_t DMAContinuousRequests
Definition: stm32f4xx_hal_adc.h:117
void window_text_init(window_text_t *window)
Definition: window_text.c:5
#define THERM_0_Pin
Definition: main.h:97
font_t * font
Definition: guitypes.h:110
TIM Master configuration Structure definition.
Definition: stm32f4xx_hal_tim_ex.h:83
int __io_putchar(int ch) __attribute__((weak))
void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc)
ADC MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:116
const window_class_term_t window_class_term
Definition: window_term.c:53
void term_write_CR(term_t *pt)
Definition: term.c:135
static void MX_GPIO_Init(void)
GPIO Initialization Function.
Definition: main.c:826
void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
Reset callback.
Definition: usbd_conf.c:190
void window_set_padding(int16_t id, padding_ui8_t padding)
Definition: window.c:549
Definition: window_frame.h:14
IHeader * number_header_factory(const char *key, const char *value, size_t value_length)
Response new NumberHeader.
Definition: lwsapi.cpp:445
#define UART_PARITY_NONE
Definition: stm32f4xx_hal_uart.h:236
static void rop_rgb8888_swapbw(uint8_t *ppx)
Definition: st7789v.c:621
bool boolean __attribute__((deprecated))
Definition: wiring_constants.h:110
const char * window_msgbox_title_text[]
Definition: window_msgbox.c:8
void * gui_malloc(unsigned int size)
Definition: gui.c:35
uint32_t Alternate
Definition: stm32f4xx_hal_gpio.h:77
static int8_t CDC_Receive_FS(uint8_t *pbuf, uint32_t *Len)
Data received over USB OUT endpoint are sent over CDC interface through this function.
Definition: usbd_cdc_if.c:297
#define RCC_HSE_ON
Definition: stm32f4xx_hal_rcc.h:137
const char * title
Definition: window_msgbox.h:75
uint8_t data[8]
Definition: masstorage.h:49
rect_ui16_t icon_rect
Definition: window_list.h:22
Class to response any static files defined in files array.
Definition: connect.cpp:84
uint32_t u32_t
Definition: arch.h:123
#define CDC_GET_LINE_CODING
Definition: usbd_cdc.h:77
#define png_check_sig(sig, n)
Definition: png.h:919
window_t * window_free_id(int16_t id)
Definition: window.c:64
void window_draw(int16_t id)
Definition: window.c:277
err_t fill_request_buffer(const struct pbuf *p)
Append pbuf to request_buffer.
Definition: connection.cpp:17
void window_destroy(int16_t id)
Definition: window.c:132
Definition: connection.hpp:23
#define GUI_DELAY_MIN
Definition: gui.c:73
void BusFault_Handler(void)
This function handles Pre-fetch fault, memory access fault.
Definition: stm32f4xx_it.c:134
#define USBH_ErrLog(...)
Definition: usbh_conf.h:176
uint32_t CLKPolarity
Definition: stm32f4xx_hal_spi.h:74
void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
Resume callback. When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support i...
Definition: usbd_conf.c:237
uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the serial number string descriptor.
Definition: usbd_desc.c:312
#define X_DIR_Pin
Definition: main.h:177
void jogwheel_init(void)
Definition: jogwheel.c:16
uint32_t DutyCycle
Definition: stm32f4xx_hal_i2c.h:68
USBH_StatusTypeDef USBH_LL_DriverVBUS(USBH_HandleTypeDef *phost, uint8_t state)
Drive VBUS.
Definition: usbh_conf.c:532
#define ALIGN_MASK
Definition: guitypes.h:18
#define RENDER_FLG_WORDB
Definition: display_helper.h:9
void _exit(int status)
Definition: syscalls.c:80
static padding_ui8_t padding_ui8(uint8_t l, uint8_t t, uint8_t r, uint8_t b)
Definition: guitypes.h:164
#define TIM_OCIDLESTATE_RESET
Definition: stm32f4xx_hal_tim.h:405
HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg)
#define ADC_CHANNEL_4
Definition: stm32f4xx_hal_adc.h:345
#define __HAL_TIM_ENABLE_IT(__HANDLE__, __INTERRUPT__)
Enable the specified TIM interrupt.
Definition: stm32f4xx_hal_tim.h:932
TIM_HandleTypeDef htim14
Definition: main.c:88
USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata)
USBD_DataInStage Handle data in stage.
Definition: usbd_core.c:343
void st7789v_gamma_prev(void)
uint8_t i
Definition: screen_test_graph.c:72
void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd)
SOF callback.
Definition: usbh_conf.c:147
#define WINDOW_CLS_USER
Definition: window.h:21
struct pbuf * next
Definition: pbuf.h:144
const uint8_t * ptr
Definition: guitypes.h:102
State_t
Response state enumeration.
Definition: connect.cpp:76
#define RCC_CLOCKTYPE_PCLK2
Definition: stm32f4xx_hal_rcc.h:209
color_t color_text
Definition: window_list.h:18
uint32_t OCFastMode
Definition: stm32f4xx_hal_tim.h:107
Definition: stm32f4xx_hal_def.h:60
#define WINDOW_FLG_VISIBLE
Definition: window.h:24
rect_ui16_t msg_box_sz
Definition: guitypes.h:114
HCD_HandleTypeDef hhcd_USB_OTG_HS
Definition: usbh_conf.c:67
#define GPIO_MODE_ANALOG
Definition: stm32f4xx_hal_gpio.h:141
#define Z_STEP_Pin
Definition: main.h:185
#define max(a, b)
Definition: wiring_constants.h:40
static volatile fsensor_t state
Definition: filament_sensor.c:23
window_draw_t * draw
Definition: window.h:72
uint8_t control
Definition: st7789v.h:31
uint32_t Pull
Definition: stm32f4xx_hal_gpio.h:71
float value
Definition: window_numb.h:22
int window_get_top_index(int16_t id)
Definition: window.c:648
#define RCC_CLOCKTYPE_PCLK1
Definition: stm32f4xx_hal_rcc.h:208
void window_set_color_back(int16_t id, color_t clr)
Definition: window.c:431
void st7789v_fill_rect(rect_ui16_t rc, color_t clr)
Definition: st7789v.c:490
color_t color_back
Definition: window_numb.h:19
uint16_t gui_flags
Definition: gui.c:9
struct _window_progress_t window_progress_t
void st7789v_done(void)
Definition: st7789v.c:346
priority: idle (lowest)
Definition: cmsis_os.h:218
int32_t osSignalSet(osThreadId thread_id, int32_t signal)
Set the specified Signal Flags of an active thread.
Definition: cmsis_os.c:545
void st7789v_draw_char(point_ui16_t pt, char chr, font_t *pf, color_t clr0, color_t clr1)
Definition: st7789v.c:514
void jogwheel_encoder_set(int32_t val, int32_t min, int32_t max)
Definition: jogwheel.c:83
#define METHOD_LENGTH
maximum method length (PROPPATCH) from WebDAV + \0
Definition: lwsapi_app.hpp:36
const char * window_msgbox_button_text[]
Definition: window_msgbox.c:43
General defines for the usb device library.
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
Definition: main.c:931
int _open(char *path, int flags,...)
Definition: syscalls.c:143
void window_destroy(int16_t id)
Definition: window.c:132
screen_t * screens[SCREEN_MAX_SCREENS]
Definition: screen.c:12
#define TIM_TRGO_RESET
Definition: stm32f4xx_hal_tim.h:688
uint8_t colmod
Definition: st7789v.h:25
uint16_t data_size
Definition: screen.h:25
#define FLASH_MOSI_Pin
Definition: main.h:175
int HAL_SPI_Initialized
Definition: main.c:107
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Clears a Stall condition on an endpoint of the Low Level Driver.
Definition: usbd_conf.c:548
#define GPIO_MODE_AF_OD
Definition: stm32f4xx_hal_gpio.h:139
uint8_t jogwheel_signals_old
Definition: jogwheel.c:8
#define MENU_TIMEOUT_MS
Definition: guiconfig.h:20
#define __HAL_TIM_DISABLE_IT(__HANDLE__, __INTERRUPT__)
Disable the specified TIM interrupt.
Definition: stm32f4xx_hal_tim.h:949
uint32_t SystemCoreClock
Definition: system_stm32f4xx.c:136
color_t color_text
Definition: window_term.h:18
uint32_t CRCPolynomial
Definition: stm32f4xx_hal_spi.h:99
#define COLOR_LIME
Definition: guitypes.h:44
uint32_t PLLQ
Definition: stm32f4xx_hal_rcc_ex.h:81
window_t * window_0
Definition: window.c:12
osStatus osKernelStart(void)
Start the RTOS Kernel with executing the specified thread.
Definition: cmsis_os.c:193
uint32_t CounterMode
Definition: stm32f4xx_hal_tim.h:68
#define ALIGN_RIGHT
Definition: guitypes.h:12
DMA_InitTypeDef Init
Definition: stm32f4xx_hal_dma.h:159
static int rect_in_rect_ui16(rect_ui16_t rc, rect_ui16_t rc1)
Definition: guitypes.h:173
#define Z_DIR_Pin
Definition: main.h:149
USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
Assigns a USB address to the device.
Definition: usbd_conf.c:596
Definition: window_icon.h:11
DMA_HandleTypeDef hdma_usart2_rx
Definition: main.c:94
uint8_t pinCS
Definition: st7789v.h:21
u8_t flags
Definition: netif.h:305
color_t color_disabled
Definition: guitypes.h:109
#define lwsapi_error
Definition: lwsapi_app.hpp:42
const uint8_t status_prnspeed_svg[]
Definition: status_prnspeed_svg.c:3
#define UART_MODE_TX_RX
Definition: stm32f4xx_hal_uart.h:259
display_draw_text_t * draw_text
Definition: display.h:35
USBH_StatusTypeDef USBH_LL_OpenPipe(USBH_HandleTypeDef *phost, uint8_t pipe_num, uint8_t epnum, uint8_t dev_address, uint8_t speed, uint8_t ep_type, uint16_t mps)
Open a pipe of the low level driver.
Definition: usbh_conf.c:388
uint32_t Direction
Definition: stm32f4xx_hal_dma.h:70
#define ST7789V_COLS
Definition: st7789v.c:14
USBH_StatusTypeDef USBH_MSC_Read(USBH_HandleTypeDef *phost, uint8_t lun, uint32_t address, uint8_t *pbuf, uint32_t length)
USBH_MSC_Read The function performs a Read operation.
Definition: usbh_msc.c:700
uint32_t Priority
Definition: stm32f4xx_hal_dma.h:91
int window_is_visible(int16_t id)
Definition: window.c:252
#define RCC_LSI_ON
Definition: stm32f4xx_hal_rcc.h:168
#define USBD_IDX_PRODUCT_STR
Definition: usbd_def.h:68
#define SPI_CRCCALCULATION_DISABLE
Definition: stm32f4xx_hal_spi.h:269
TIM_HandleTypeDef htim6
Definition: stm32f4xx_hal_timebase_tim.c:49
uint8_t alignment
Definition: window_numb.h:25
#define GPIO_PIN_10
Definition: stm32f4xx_hal_gpio.h:112
uint8_t UserRxBufferFS[APP_RX_DATA_SIZE]
Definition: usbd_cdc_if.c:128
void term_done(term_t *pt)
Definition: term.c:26
uint32_t PLLSource
Definition: stm32f4xx_hal_rcc_ex.h:68
#define RCC_OSCILLATORTYPE_LSI
Definition: stm32f4xx_hal_rcc.h:128
IResponse::unique_ptr_t application(Environment &env)
application_fn callback, which is called from LwIP WSAPI http server
Definition: connect.cpp:306
#define HOST_USER_CONNECTION
Definition: usbh_core.h:67
char * text
Definition: window_text.h:20
err_t prepare_response()
Process message.response to internal buffer.
Definition: connection.cpp:152
void window_destroy_children(int16_t id)
Definition: window.c:157
uint8_t pinRS
Definition: st7789v.h:22
uint8_t jogwheel_signals
Definition: jogwheel.c:7
#define ADC_SOFTWARE_START
Definition: stm32f4xx_hal_adc.h:324
color_t color_text
Definition: window_msgbox.h:70
#define TIM_OCMODE_PWM1
Definition: stm32f4xx_hal_tim.h:365
static FORCE_INLINE float degHotend(const uint8_t E_NAME)
Definition: temperature.h:544
#define DMA_PINC_DISABLE
Definition: stm32f4xx_hal_dma.h:256
UART_HandleTypeDef huart6
Definition: main.c:92
void gui_free(void *ptrx)
Definition: gui.c:39
void DMA1_Stream5_IRQHandler(void)
This function handles DMA1 stream5 global interrupt.
Definition: stm32f4xx_it.c:192
#define USB_DESC_TYPE_DEVICE
Definition: usbd_def.h:95
#define CRLF
Definition: connection.hpp:7
#define ROPFN_INVERT
Definition: guitypes.h:31
USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Closes an endpoint of the low level driver.
Definition: usbd_conf.c:452
Definition: usbh_def.h:450
#define WINDOW_EVENT_CHANGE
Definition: window.h:47
struct _window_frame_t window_frame_t
#define SCREEN_MAX_HISTORY
Definition: screen.c:8
#define I2C_GENERALCALL_DISABLE
Definition: stm32f4xx_hal_i2c.h:257
void * pClassData
Definition: usbd_def.h:246
TIM Output Compare Configuration Structure definition.
Definition: stm32f4xx_hal_tim.h:92
void uartslave_init(uartslave_t *pslave, uartrxbuff_t *prxbuff, int size, char *pline)
Definition: uartslave.c:57
uint32_t Channel
Definition: stm32f4xx_hal_adc.h:133
osThreadId osThreadGetId(void)
Return the thread ID of the current running thread.
Definition: cmsis_os.c:283
DMA_HandleTypeDef hdma_usart2_rx
Definition: main.c:94
#define MSGBOX_BTN_MAX
Definition: window_msgbox.h:29
float window_get_min(int16_t id)
Definition: window.c:694
Internal connection structure which is used in LwIP tcp_ callbacks as arg.
Definition: connection.hpp:20
uint32_t Reload
Definition: stm32f4xx_hal_iwdg.h:68
uint32_t OscillatorType
Definition: stm32f4xx_hal_rcc.h:69
HCD_HandleTypeDef hhcd_USB_OTG_HS
Definition: usbh_conf.c:67
void st7789v_cmd_caset(uint16_t x, uint16_t cx)
Definition: st7789v.c:263
uint32_t PLLM
Definition: stm32f4xx_hal_rcc_ex.h:71
#define NULL
Definition: usbd_def.h:53
void * pdata
Definition: screen.h:26
#define USB_MAX_EP0_SIZE
Definition: usbd_def.h:115
int window_is_invalid(int16_t id)
Definition: window.c:262
int16_t window_first_child(int16_t id)
Definition: window.c:218
#define GUI_FLG_INVALID
Definition: gui.c:7
osStatus status
status code: event or error information
Definition: cmsis_os.h:396
#define FLASH_MISO_Pin
Definition: main.h:173
#define WINDOW_PROGRESS_MAX_TEXT
Definition: window_progress.c:5
void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
Setup stage callback.
Definition: usbd_conf.c:152
const window_class_msgbox_t window_class_msgbox
Definition: window_msgbox.c:249
BufferResponse()
Definition: connect.cpp:125
#define MSGBOX_ICO_INFO
Definition: window_msgbox.h:36
void gui_timer_delete(int8_t id)
Definition: gui_timer.c:79
uint32_t HSEState
Definition: stm32f4xx_hal_rcc.h:72
const window_class_numb_t window_class_numb
Definition: window_numb.c:41
png_uint_32 PNGAPI png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr)
Definition: pngget.c:61
uint32_t AutomaticOutput
Definition: stm32f4xx_hal_tim_ex.h:108
#define ADC_CLOCK_SYNC_PCLK_DIV4
Definition: stm32f4xx_hal_adc.h:251
#define memlen(start, end)
return lenght of data from start to end
Definition: connection.hpp:16
#define TIM_CHANNEL_3
Definition: stm32f4xx_hal_tim.h:424
uint16_t st7789v_cx
Definition: st7789v.c:79
#define MAX(a, b)
Definition: usbd_def.h:266
void HAL_MspInit(void)
Definition: stm32f4xx_hal_msp.c:93
ip4_addr_t gw
Definition: lwip.c:75
void * mem_calloc(mem_size_t count, mem_size_t size)
Definition: mem.c:765
uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the interface string descriptor.
Definition: usbd_desc.c:342
#define CDC_SET_COMM_FEATURE
Definition: usbd_cdc.h:73
window_done_t * done
Definition: window.h:71
#define CMD_CASET
Definition: st7789v.c:25
font_t * font
Definition: window_progress.h:20
#define CDC_SEND_ENCAPSULATED_COMMAND
Definition: usbd_cdc.h:71
err_t prepare_header()
Process message.headers to internal buffer.
Definition: connection.cpp:171
void screen_open(int16_t screen_id)
Definition: screen.c:62
USBH_StatusTypeDef USBH_LL_ResetPort(USBH_HandleTypeDef *phost)
Reset the Host port of the low level driver.
Definition: usbh_conf.c:342
#define USBD_MAX_NUM_CONFIGURATION
Definition: usbd_conf.h:97
const int32_t * range
Definition: window_menu.h:38
window_t * window_0
Definition: window.c:12
int window_is_focused(int16_t id)
Definition: window.c:267
void st7789v_cmd_slpout(void)
Definition: st7789v.c:247
#define GUI_TIMER_NONE
Definition: gui_timer.c:10
#define SCREEN_MAX_SCREENS
Definition: screen.c:6
void st7789v_draw_png_ex(point_ui16_t pt, FILE *pf, color_t clr0, uint8_t rop)
Definition: st7789v.c:885
USBH_StatusTypeDef USBH_LL_Stop(USBH_HandleTypeDef *phost)
Stop the low level portion of the host driver.
Definition: usbh_conf.c:283
const uint8_t window_msgbox_buttons[][3]
Definition: window_msgbox.c:30
void interval_intersect_ui16(uint16_t *p)
Definition: guitypes.c:7
int8_t gui_timer_count
Definition: gui_timer.c:35
Definition: guitypes.h:64
end
Definition: createSpeedLookupTable.py:33
Definition: usbh_def.h:320
int font_line_chars(font_t *pf, const char *str, uint16_t line_width)
Definition: guitypes.c:122
#define MSGBOX_BTN_OK
Definition: window_msgbox.h:20
uint8_t col
Definition: term.h:50
#define TX1_Pin
Definition: main.h:193
void st7789v_draw_line(point_ui16_t pt, point_ui16_t pt1, color_t clr)
Definition: st7789v.c:438
void HAL_PCD_MspInit(PCD_HandleTypeDef *pcdHandle)
Definition: usbd_conf.c:94
Definition: window_term.h:11
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
window_t * window_focused_ptr
Definition: window.c:19
osStatus osDelay(uint32_t millisec)
Wait for Timeout (Time Delay)
Definition: cmsis_os.c:365
uint32_t Rank
Definition: stm32f4xx_hal_adc.h:135
#define ALIGN_LEFT_TOP
Definition: guitypes.h:20
#define CDC_GET_COMM_FEATURE
Definition: usbd_cdc.h:74
int _kill(int pid, int sig)
Definition: syscalls.c:75
#define GUI_DELAY_LOOP
Definition: gui.c:75
Definition: connect.cpp:77
rect_ui16_t rect_ui16_sub_padding_ui8(rect_ui16_t rc, padding_ui8_t pad)
Definition: guitypes.c:55
color_t color_back
Definition: window_frame.h:20
display_fill_rect_t * fill_rect
Definition: display.h:33
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
#define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__)
macros configure the main internal regulator output voltage.
Definition: stm32f4xx_hal_pwr_ex.h:153
uint8_t id
Definition: usbh_def.h:462
uint32_t LockLevel
Definition: stm32f4xx_hal_tim_ex.h:100
int16_t id
Definition: window.h:79
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
SPI MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:337
static void MX_DMA_Init(void)
Definition: main.c:801
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig)
USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps)
Opens an endpoint of the low level driver.
Definition: usbd_conf.c:420
int16_t window_first_child(int16_t id)
Definition: window.c:218
uint8_t alignment
Definition: window_progress.h:22
void window_validate(int16_t id)
Definition: window.c:298
void window_disable(int16_t id)
Definition: window.c:523
Definition: stm32f4xx_hal_def.h:58
#define RCC_PLLSOURCE_HSE
Definition: stm32f4xx_hal_rcc.h:198
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32f4xx_hal_def.h:55
uint8_t left
Definition: guitypes.h:87
#define __HAL_RCC_GPIOH_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:423
Definition: window_numb.h:13
#define TIM_BREAKPOLARITY_HIGH
Definition: stm32f4xx_hal_tim.h:671
color_t color_back
Definition: window_icon.h:13
static int gpio_get(uint8_t pin8)
Definition: gpio.h:94
void uartrxbuff_rxcplt_cb(uartrxbuff_t *prxbuff)
Definition: uartrxbuff.c:71
uint32_t OffStateIDLEMode
Definition: stm32f4xx_hal_tim_ex.h:98
void term_init(term_t *pt, uint8_t cols, uint8_t rows, uint8_t *buff)
Definition: term.c:6
padding_ui8_t padding
Definition: guitypes.h:112
uint32_t f_invalid
Definition: window.h:87
void window_frame_init(window_frame_t *window)
Definition: window_frame.c:5
static void USBH_UserProcess(USBH_HandleTypeDef *phost, uint8_t id)
Definition: usb_host.c:127
void HardFault_Handler(void)
This function handles Hard fault interrupt.
Definition: stm32f4xx_it.c:108
#define COLOR_GRAY
Definition: guitypes.h:50
void screen_draw(void)
Definition: screen.c:98
static UART_HandleTypeDef huart1
Definition: main.c:90
uint16_t st7789v_x
Definition: st7789v.c:77
void EXTI15_10_IRQHandler(void)
This function handles EXTI line[15:10] interrupts.
Definition: stm32f4xx_it.c:205
void window_set_top_index(int16_t id, int top_index)
Definition: window.c:636
void term_set_char_at(term_t *pt, uint8_t col, uint8_t row, uint8_t ch)
Definition: term.c:60
void window_set_alignment(int16_t id, uint8_t alignment)
Definition: window.c:561
void window_spin_inc(window_spin_t *window, int dif)
Definition: window_spin.c:42
void StartDefaultTask(void const *argument)
Function implementing the defaultTask thread.
Definition: main.c:951
int index
Definition: window_spin.h:18
#define TIM_CLOCKDIVISION_DIV1
Definition: stm32f4xx_hal_tim.h:351
int HAL_GPIO_Initialized
Definition: main.c:104
#define USBD_IDX_MFC_STR
Definition: usbd_def.h:67
const uint8_t * resource_ptr(uint16_t id)
Definition: guitypes.c:168
char * format
Definition: window_numb.h:23
#define USB_DESC_TYPE_BOS
Definition: usbd_def.h:102
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
Initializes the low level portion of the device driver.
Definition: usbd_conf.c:290
#define WINDOW_CLS_LIST
Definition: window.h:13
#define GUI_TIMER_1SHT
Definition: gui_timer.c:11
HAL_StatusTypeDef HAL_Init(void)
This function is used to initialize the HAL Library; it must be the first instruction to be executed ...
Definition: stm32f4xx_hal.c:173
DMA_HandleTypeDef hdma_usart6_rx
Definition: main.c:95
uint32_t Prescaler
Definition: stm32f4xx_hal_iwdg.h:65
#define RCC_PLL_ON
Definition: stm32f4xx_hal_rcc.h:178
void st7789v_spi_wr_byte(uint8_t b)
Definition: st7789v.c:163
window_t win
Definition: window_msgbox.h:68
#define GPIO_PIN_8
Definition: stm32f4xx_hal_gpio.h:110
Definition: cmsis_os.h:395
#define E_STEP_Pin
Definition: main.h:137
void app_cdc_rx(uint8_t *buffer, uint32_t length)
Definition: appmain.cpp:153
window_t * window_ptr(int16_t id)
Definition: window.c:82
color_t color_back
Definition: window_msgbox.h:69
#define MSGBOX_SHI_IDX
Definition: window_msgbox.h:16
#define E_DIAG_Pin
Definition: main.h:169
ApplicationTypeDef
Definition: usb_host.h:85
#define __HAL_RCC_SYSCFG_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:615
window_t win
Definition: window_icon.h:12
IHeader * dynamics_header_factory(const char *key, const char *value, size_t value_length)
Return new DynamicsHeader.
Definition: lwsapi.cpp:440
USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev)
USBD_Resume Handle Resume event.
Definition: usbd_core.c:478
Definition: window_msgbox.h:63
void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hcdHandle)
Definition: usbh_conf.c:119
static uint16_t swap_ui16(uint16_t val)
Definition: guitypes.h:120
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
Definition: connect.cpp:78
#define USB_LEN_DEV_DESC
Definition: usbd_def.h:58
void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
Data In stage callback.
Definition: usbd_conf.c:172
void window_invalidate(int16_t id)
Definition: window.c:304
uint32_t gui_loop_tick
Definition: gui.c:33
void screen_close(void)
Definition: screen.c:80
#define X_DIAG_Pin
Definition: main.h:85
int32_t jogwheel_encoder
Definition: jogwheel.c:10
uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the product string descriptor.
Definition: usbd_desc.c:286
Definition: window_numb.h:17
Definition: usbh_def.h:321
SPI_HandleTypeDef hspi3
Definition: main.c:82
void() window_done_t(void *window)
Definition: window.h:56
#define RCC_HCLK_DIV4
Definition: stm32f4xx_hal_rcc.h:261
int _link(char *old, char *new)
Definition: syscalls.c:167
uint32_t f_parent
Definition: window.h:95
window_t win
Definition: window_term.h:16
void MX_USB_DEVICE_Init(void)
Definition: usb_device.c:93
int window_enabled_child_count(int16_t id)
Definition: window.c:240
int usbd_cdc_initialized
Definition: usbd_cdc_if.c:64
int _isatty(int file)
Definition: syscalls.c:135
#define FAN1_TACH_Pin
Definition: main.h:126
int16_t screen_id(void)
Definition: screen.c:18
void window_icon_init(window_icon_t *window)
Definition: window_icon.c:5
const window_class_term_t window_class_term
Definition: window_term.c:53
static void rop_rgb888_swapbw(uint8_t *ppx888)
Definition: st7789v.c:593
#define JOGWHEEL_FLG_INV_ENC
Definition: jogwheel.h:9
__IO uint32_t TxState
Definition: usbd_cdc.h:121
osThreadId displayTaskHandle
Definition: main.c:98
window_t win
Definition: window_list.h:16
Definition: window_msgbox.h:67
uint32_t AddressingMode
Definition: stm32f4xx_hal_i2c.h:74
void USBH_LL_SetTimer(USBH_HandleTypeDef *phost, uint32_t)
USBH_LL_SetTimer Set the initial Host Timer tick.
Definition: usbh_core.c:791
void gui_invalidate(void)
Definition: gui.c:66
screen_draw_t * draw
Definition: screen.h:23
osEvent osSignalWait(int32_t signals, uint32_t millisec)
Wait for one or more Signal Flags to become signaled for the current RUNNING thread.
Definition: cmsis_os.c:586
#define min(a, b)
Definition: wiring_constants.h:36
const uint8_t status_nozzle_svg[]
Definition: status_nozzle_svg.c:3
void st7789v_cmd_raset(uint16_t y, uint16_t cy)
Definition: st7789v.c:268
Definition: stm32f4xx_hal_gpio.h:86
void window_progress_init(window_progress_t *window)
Definition: window_progress.c:7
#define MSGBOX_RES_ABORT
Definition: window_msgbox.h:41
void app_tim14_tick(void)
Definition: appmain.cpp:173
int __io_getchar(void)
Definition: syscalls.c:60
#define netif_is_link_up(netif)
Definition: netif.h:413
#define WINDOW_CLS_SPIN
Definition: window.h:15
Definition: usb_host.h:88
USBH_StatusTypeDef USBH_LL_Start(USBH_HandleTypeDef *phost)
Start the low level portion of the host driver.
Definition: usbh_conf.c:252
uint32_t flags
Definition: gui_timer.c:22
int count
Definition: window_spin.h:17
#define COLOR_ORANGE
Definition: guitypes.h:57
void OTG_FS_IRQHandler(void)
This function handles USB On The Go FS global interrupt.
Definition: stm32f4xx_it.c:284
#define BUZZER_Pin
Definition: main.h:99
#define BED_HEAT_Pin
Definition: main.h:109
uint32_t RepetitionCounter
Definition: stm32f4xx_hal_tim.h:78
#define MSGBOX_RES_CUSTOM2
Definition: window_msgbox.h:51
USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata)
USBD_DataOutStage Handle data OUT stage.
Definition: usbd_core.c:299
#define DMA_MINC_ENABLE
Definition: stm32f4xx_hal_dma.h:265
uint8_t USBH_LL_GetToggle(USBH_HandleTypeDef *phost, uint8_t pipe)
Return the current toggle of a pipe.
Definition: usbh_conf.c:583
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim_base)
TIM_Base MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:386
USBH_StatusTypeDef USBH_MSC_GetLUNInfo(USBH_HandleTypeDef *phost, uint8_t lun, MSC_LUNTypeDef *info)
USBH_MSC_GetLUNInfo The function return a LUN information.
Definition: usbh_msc.c:676
#define CMD_MADCTL
Definition: st7789v.c:29
#define WINDOW_FLG_CAPTURE
Definition: window.h:29
uint32_t DeadTime
Definition: stm32f4xx_hal_tim_ex.h:102
#define TIM_IT_UPDATE
Definition: stm32f4xx_hal_tim.h:491
window_class_t * window_user_classes[WINDOW_MAX_USERCLS]
Definition: window.c:40
#define SPI_NSS_SOFT
Definition: stm32f4xx_hal_spi.h:226
uint8_t retries
Definition: connection.hpp:29
USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
Stops the low level portion of the device driver.
Definition: usbd_conf.c:386
Definition: usbd_def.h:225
#define FLASH_SCK_Pin
Definition: main.h:171
uint32_t MemInc
Definition: stm32f4xx_hal_dma.h:77
DMA_HandleTypeDef hdma_usart1_rx
Definition: main.c:93
uint8_t cols
Definition: term.h:44
void SystemInit(void)
Setup the microcontroller system Initialize the FPU setting, vector table location and External memor...
Definition: system_stm32f4xx.c:166
int8_t gui_timer_create_periodical(uint32_t ms, int16_t win_id)
Definition: gui_timer.c:70
#define WINDOW_CLS_PROGRESS
Definition: window.h:20
int term_printf(term_t *pt, const char *fmt,...)
Definition: term.c:178
float step
Definition: window_spin.h:16
FATFS USBHFatFS
Definition: fatfs.c:53
USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Sets a Stall condition on an endpoint of the Low Level Driver.
Definition: usbd_conf.c:516
uint16_t y
Definition: guitypes.h:66
uint8_t u8_t
Definition: arch.h:119
#define TIM_CLOCKSOURCE_INTERNAL
Definition: stm32f4xx_hal_tim.h:565
ip4_addr_t netmask
Definition: lwip.c:74
int _unlink(char *name)
Definition: syscalls.c:153
#define __HAL_RCC_USART6_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:594
const header_factory_t req_headers[]
Definition: connect.cpp:37
#define __HAL_RCC_CLEAR_RESET_FLAGS()
Set RMVF bit to clear the reset flags: RCC_FLAG_PINRST, RCC_FLAG_PORRST, RCC_FLAG_SFTRST,...
Definition: stm32f4xx_hal_rcc.h:1225
void * pData
Definition: usbd_def.h:248
padding_ui8_t padding
Definition: window_text.h:21
#define WINDOW_EVENT_BTN_UP
Definition: window.h:39
const char * content_type
Definition: connect.cpp:46
void window_show(int16_t id)
Definition: window.c:529
uint8_t * USBD_FS_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the manufacturer string descriptor.
Definition: usbd_desc.c:301
size_t find_eoh(const void *data=nullptr, size_t length=0)
Try to find End Of Header (\r \r ) in buffer.
Definition: connection.cpp:39
static int rect_empty_ui16(rect_ui16_t rc)
Definition: guitypes.h:177
rect_ui16_t rect_intersect_ui16(rect_ui16_t rc, rect_ui16_t rc1)
Definition: guitypes.c:37
#define WINDOW_EVENT_FOCUS0
Definition: window.h:42
window_list_item_t * list_item
Definition: window_list.h:26
char * window_get_text(int16_t id)
Definition: window.c:352
#define ESP_RST_Pin
Definition: main.h:95
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
#define GPIO_MODE_IT_RISING
Definition: stm32f4xx_hal_gpio.h:143
RCC_PLLInitTypeDef PLL
Definition: stm32f4xx_hal_rcc.h:87
static void gpio_init(uint8_t pin8, uint32_t mode, uint32_t pull, uint32_t speed)
Definition: gpio.h:102
#define MSGBOX_MSK_CHG
Definition: window_msgbox.h:11
#define __HAL_RCC_SPI2_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:500
float max
Definition: window_spin.h:15
const uint8_t status_prnflow_svg[]
Definition: status_prnflow_svg.c:3
const window_class_spin_t window_class_spin
Definition: window_spin.c:58
#define ALIGN_TOP
Definition: guitypes.h:14
static void st7789v_set_cs(void)
Definition: st7789v.c:107
#define USBD_INTERFACE_STRING_FS
Definition: usbd_desc.c:101
#define TERM_DEF_ATTR
Definition: term.h:34
Definition: gui_timer.c:18
Structure definition of ADC channel for regular group.
Definition: stm32f4xx_hal_adc.h:131
#define GPIO_PIN_3
Definition: stm32f4xx_hal_gpio.h:105
void st7789v_spi_tx_complete(void)
Definition: st7789v.c:927
char asc_max
Definition: guitypes.h:83
window_event_t * event
Definition: window.h:73
HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc)
uint32_t Mode
Definition: stm32f4xx_hal_uart.h:84
int _write(int file, char *ptr, int len)
Definition: syscalls.c:96
err_t tcpip_input(struct pbuf *p, struct netif *inp)
Definition: tcpip.c:212
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
padding_ui8_t padding
Definition: window_list.h:20
void window_set_item_index(int16_t id, int index)
Definition: window.c:598
Header for ff_gen_drv.c module.
Definition: usb_host.h:86
uint32_t DataAlign
Definition: stm32f4xx_hal_adc.h:80
USBH_StatusTypeDef USBH_LL_Disconnect(USBH_HandleTypeDef *phost)
USBH_LL_Disconnect Handle USB Host disconnection event.
Definition: usbh_core.c:854
#define chrshift(ptr, size)
Definition: connection.hpp:12
#define MSGBOX_RES_YES
Definition: window_msgbox.h:44
#define TIM_COUNTERMODE_UP
Definition: stm32f4xx_hal_tim.h:339
uint32_t BaudRate
Definition: stm32f4xx_hal_uart.h:65
Definition: usbh_def.h:304
uint32_t TIMode
Definition: stm32f4xx_hal_spi.h:93
static void MX_I2C1_Init(void)
I2C1 Initialization Function.
Definition: main.c:382
void window_enable(int16_t id)
Definition: window.c:517
void window_msgbox_init(window_msgbox_t *window)
Definition: window_msgbox.c:138
#define ROPFN_DISABLE
Definition: guitypes.h:33
uint8_t alignment
Definition: window_msgbox.h:74
USBD_CDC_ItfTypeDef USBD_Interface_fops_FS
Definition: usbd_cdc_if.c:174
int _fstat(int file, struct stat *st)
Definition: syscalls.c:130
#define SPI_PHASE_1EDGE
Definition: stm32f4xx_hal_spi.h:217
#define WINDOW_FLG_NUMB_FLOAT2INT
Definition: window_numb.h:8
void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd, uint8_t chnum, HCD_URBStateTypeDef urb_state)
Notify URB state change callback.
Definition: usbh_conf.c:176
#define MSGBOX_MSK_IDX
Definition: window_msgbox.h:10
#define WINDOW_CLS_FRAME
Definition: window.h:9
#define RCC_CLOCKTYPE_SYSCLK
Definition: stm32f4xx_hal_rcc.h:206
IWDG_TypeDef * Instance
Definition: stm32f4xx_hal_iwdg.h:78
uint8_t bpr
Definition: guitypes.h:79
uint32_t GeneralCallMode
Definition: stm32f4xx_hal_i2c.h:83
uint32_t Resolution
Definition: stm32f4xx_hal_adc.h:78
uint8_t jogwheel_changed
Definition: jogwheel.c:14
USBD_ClassTypeDef USBD_CDC
Definition: usbd_cdc.c:159
void
Definition: png.h:1083
Definition: lwsapi_app.hpp:218
struct _window_msgbox_t window_msgbox_t
display_init_t * init
Definition: display.h:27
void st7789v_cmd_colmod(uint8_t colmod)
Definition: st7789v.c:255
void term_clear(term_t *pt)
Definition: term.c:34
float max
Definition: window_progress.h:27
DMA handle Structure definition.
Definition: stm32f4xx_hal_dma.h:155
char * window_get_format(int16_t id)
Definition: window.c:418
const window_class_icon_t window_class_icon
Definition: window_icon.c:29
#define TIM_CHANNEL_2
Definition: stm32f4xx_hal_tim.h:423
uint16_t flg
Definition: term.h:46
osThreadId webServerTaskHandle
Definition: main.c:100
#define E_ENA_Pin
Definition: main.h:139
#define TIM_OSSR_DISABLE
Definition: stm32f4xx_hal_tim.h:634
This file contains the headers of the interrupt handlers.
#define DMA_CIRCULAR
Definition: stm32f4xx_hal_dma.h:298
#define CMD_INVON
Definition: st7789v.c:21
#define USBD_SERIALNUMBER_STRING_FS
Definition: usbd_desc.c:99
void window_draw_children(int16_t id)
Definition: window.c:284
uint8_t st7789v_buff[ST7789V_COLS *2 *16]
Definition: st7789v.c:82
const uint8_t under_construction_gif[]
Definition: under_construction_gif.c:3
void window_list_item(window_list_t *pwindow_list, uint16_t index, const char **pptext, uint16_t *pid_icon)
Definition: window_list.c:19
PCD_HandleTypeDef hpcd_USB_OTG_FS
Definition: usbd_conf.c:69
static void window_term_draw(window_term_t *window)
Definition: window_term.c:46
gui_loop_cb_t * gui_loop_cb
Definition: gui.c:32
uint8_t USBH_MSC_UnitIsReady(USBH_HandleTypeDef *phost, uint8_t lun)
USBH_MSC_UnitIsReady The function check whether a LUN is ready.
Definition: usbh_msc.c:655
color_t color_back
Definition: guitypes.h:107
Definition: window_icon.h:18
#define WINDOW_CLS_MENU
Definition: window.h:18
void window_msgbox_step(window_msgbox_t *window, int step)
Definition: window_msgbox.c:113
#define TIM_CHANNEL_4
Definition: stm32f4xx_hal_tim.h:425
uint8_t w
Definition: guitypes.h:77
uint8_t madctl
Definition: st7789v.h:26
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
screen_done_t * done
Definition: screen.h:22
size_t PNGAPI png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr)
Definition: pngget.c:30
~Context()
Definition: connection.hpp:70
const window_class_frame_t window_class_frame
Definition: window_frame.c:65
HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
int32_t value
Definition: window_menu.h:37
font_t * font
Definition: window_msgbox.h:71
#define WINDOW_EVENT_FOCUS1
Definition: window.h:43
uint32_t Channel
Definition: stm32f4xx_hal_dma.h:67
float value
Definition: window_menu.h:44
const window_class_text_t window_class_text
Definition: window_text.c:27
void window_msgbox_event(window_msgbox_t *window, uint8_t event, void *param)
Definition: window_msgbox.c:235
void gui_init(void)
Definition: gui.c:43
struct tcp_pcb * pcb
Definition: connection.hpp:28
int _times(struct tms *buf)
Definition: syscalls.c:158
void window_set_focus(int16_t id)
Definition: window.c:480
uint32_t PLLState
Definition: stm32f4xx_hal_rcc_ex.h:65
uint32_t APB1CLKDivider
Definition: stm32f4xx_hal_rcc.h:104
uint8_t alignment
Definition: window_list.h:21
Context(struct tcp_pcb *pcb)
Definition: connection.hpp:56
USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev)
USBD_SOF Handle SOF event.
Definition: usbd_core.c:491
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
Definition: onboard_sd.h:23
#define GPIO_PIN_14
Definition: stm32f4xx_hal_gpio.h:116
void window_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: window.c:797
uint8_t brightness
Definition: st7789v.h:29
void st7789v_init(void)
Definition: st7789v.c:327
char name[2]
Definition: netif.h:307
#define TIM_OCNIDLESTATE_RESET
Definition: stm32f4xx_hal_tim.h:414
#define GPIO_NOPULL
Definition: stm32f4xx_hal_gpio.h:170
uint8_t pinRST
Definition: st7789v.h:23
uint32_t ClockPrescaler
Definition: stm32f4xx_hal_adc.h:75
rect_ui16_t rect_align_ui16(rect_ui16_t rc, rect_ui16_t rc1, uint8_t align)
Definition: guitypes.c:64
uint8_t flg
Definition: jogwheel.h:24
#define MSGBOX_BTN_CUSTOM1
Definition: window_msgbox.h:26
Definition: connect.cpp:79
void gui_run(void)
Definition: guimain.c:107
uint16_t jogwheel_button_down
Definition: jogwheel.c:13
USART_TypeDef * Instance
Definition: stm32f4xx_hal_uart.h:160
void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
point_ui16_t icon_meas(const uint8_t *pi)
Definition: guitypes.c:155
WaitResponse(size_t request_length)
Definition: connect.cpp:163
Definition: lwsapi_app.hpp:56
void st7789v_draw_png(point_ui16_t pt, FILE *pf)
Definition: st7789v.c:883
#define MSGBOX_RES_CUSTOM0
Definition: window_msgbox.h:49
HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart)
IResponse::unique_ptr_t response
Definition: connection.hpp:37
TIM_TypeDef * Instance
Definition: stm32f4xx_hal_tim.h:289
Definition: usbd_cdc.h:101
#define RX1_Pin
Definition: main.h:195
uint32_t SamplingTime
Definition: stm32f4xx_hal_adc.h:137
window_init_t * init
Definition: window.h:70
void free_buffer()
Definition: connection.hpp:94
uartslave_t uart6slave
Definition: main.c:149
uint8_t btn_spacing
Definition: guitypes.h:115
Definition: guitypes.h:86
void term_set_attr_at(term_t *pt, uint8_t col, uint8_t row, uint8_t attr)
Definition: term.c:80
env
Definition: create_custom_upload_command_CDC.py:23
USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id)
USBD_Init Initializes the device stack and load the class driver.
Definition: usbd_core.c:96
#define TIM_COUNTERMODE_DOWN
Definition: stm32f4xx_hal_tim.h:340
void USBH_LL_IncTimer(USBH_HandleTypeDef *phost)
USBH_LL_IncTimer Increment Host Timer tick.
Definition: usbh_core.c:801
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
int window_child_count(int16_t id)
Definition: window.c:230
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
#define GPIO_SPEED_FREQ_VERY_HIGH
Definition: stm32f4xx_hal_gpio.h:161
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
#define ROPFN_SWAPBW
Definition: guitypes.h:32
uint32_t Mode
Definition: stm32f4xx_hal_dma.h:86
#define CDC_SET_CONTROL_LINE_STATE
Definition: usbd_cdc.h:78
Definition: usbh_def.h:319
void term_write_control_char(term_t *pt, uint8_t ch)
Definition: term.c:146
USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
Transmits data over an endpoint.
Definition: usbd_conf.c:630
uint32_t OwnAddress1
Definition: stm32f4xx_hal_i2c.h:71
int16_t window_prev(int16_t id)
Definition: window.c:180
#define TIM_CHANNEL_1
Definition: stm32f4xx_hal_tim.h:422
USBD_DescriptorsTypeDef FS_Desc
Definition: usbd_desc.c:160
void gui_invalidate(void)
Definition: gui.c:66
void st7789v_inversion_on(void)
BYTE DSTATUS
Definition: onboard_sd.h:19
#define USBD_MANUFACTURER_STRING
Definition: usbd_desc.c:96
uint8_t st7789v_brightness_get(void)
#define TIM_AUTOMATICOUTPUT_DISABLE
Definition: stm32f4xx_hal_tim.h:680
list a
Definition: createSpeedLookupTable.py:29
const Diskio_drvTypeDef USBH_Driver
Definition: usbh_diskio.c:77
screen_t * screen_get_curr(void)
Definition: screen.c:114
ADC handle Structure definition.
Definition: stm32f4xx_hal_adc.h:208
Environment struct like as WSGI environment as possible could be.
Definition: lwsapi_app.hpp:181
uint8_t UserTxBufferFS[APP_TX_DATA_SIZE]
Definition: usbd_cdc_if.c:131
const char * prt_format
Definition: window_menu.h:45
#define SPI_POLARITY_LOW
Definition: stm32f4xx_hal_spi.h:208
#define __HAL_RCC_I2C1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:514
#define WINDOW_CLS_MSGBOX
Definition: window.h:19
#define USBD_PRODUCT_STRING_FS
Definition: usbd_desc.c:98
#define WINDOW_EVENT_CHANGING
Definition: window.h:48
#define JOGWHEEL_FLG_INV_DIR
Definition: jogwheel.h:8
window_t * window_focused_ptr
Definition: window.c:19
I2C_InitTypeDef Init
Definition: stm32f4xx_hal_i2c.h:168
USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev)
USBD_LL_Reset Handle Reset event.
Definition: usbd_core.c:415
struct netif eth0
Definition: lwip.c:72
void HAL_PCD_MspDeInit(PCD_HandleTypeDef *pcdHandle)
Definition: usbd_conf.c:124
USBH_URBStateTypeDef USBH_LL_GetURBState(USBH_HandleTypeDef *phost, uint8_t pipe)
Get a URB state from the low level driver.
Definition: usbh_conf.c:519
const char * HTTP_200
Definition: http_states.c:3
uint8_t term_get_attr(term_t *pt)
Definition: term.c:91
__ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END
Definition: usbd_desc.c:172
void() window_event_t(void *window, uint8_t event, void *param)
Definition: window.h:58
Definition: guitypes.h:69
static void st7789v_clr_rs(void)
Definition: st7789v.c:122
display_t * display
Definition: display.c:6
Definition: usbd_def.h:196
#define ESP_RX_Pin
Definition: main.h:153
uint8_t CDC_Transmit_FS(uint8_t *Buf, uint16_t Len)
CDC_Transmit_FS Data to send over USB IN endpoint are sent over CDC interface through this function.
Definition: usbd_cdc_if.c:317
void netif_set_default(struct netif *netif)
Definition: netif.c:604
Definition: usbd_def.h:188
struct _gui_timer_t gui_timer_t
void StartIdleTask(void const *argument)
Function implementing the idleTask thread.
Definition: main.c:997
struct _window_term_t window_term_t
#define TIM3_default_Period
Definition: timer_defaults.h:13
#define __HAL_RCC_DMA2_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:437
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
void render_text_align(rect_ui16_t rc, const char *text, font_t *font, color_t clr0, color_t clr1, padding_ui8_t padding, uint16_t flags)
Definition: display_helper.c:6
#define JOGWHEEL_FLG_INV_E12
Definition: jogwheel.h:10
osThreadId defaultTaskHandle
Definition: main.c:97
TIM_HandleTypeDef htim6
Definition: stm32f4xx_hal_timebase_tim.c:49
uint16_t window_count
Definition: window.c:17
u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len)
void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
#define E_DIAG_GPIO_Port
Definition: main.h:170
Definition: usbd_cdc.h:111
#define ALIGN_LEFT
Definition: guitypes.h:10
#define DMA_MDATAALIGN_BYTE
Definition: stm32f4xx_hal_dma.h:286
#define I2C_DUALADDRESS_DISABLE
Definition: stm32f4xx_hal_i2c.h:248
uint8_t id
Definition: usbd_def.h:227
ADC_InitTypeDef Init
Definition: stm32f4xx_hal_adc.h:212
#define MASK_CTRLD_BCTRL
Definition: st7789v.c:49
const uint8_t[]
Definition: 404_html.c:3
DMA_HandleTypeDef hdma_usart1_rx
Definition: main.c:93
#define ADC_EXTERNALTRIGCONVEDGE_NONE
Definition: stm32f4xx_hal_adc.h:295
#define _dbg(...)
Definition: dbg.h:50
void SystemClock_Config(void)
System Clock Configuration.
Definition: main.c:295
Definition: pngstruct.h:143
void app_run(void)
Definition: appmain.cpp:62
const uint8_t index_css[]
Definition: index_css.c:3
#define RCC_CLOCKTYPE_HCLK
Definition: stm32f4xx_hal_rcc.h:207
void netif_link_callback(struct netif *eth)
Definition: lwip.c:79
std::unique_ptr< IResponse > unique_ptr_t
Definition: lwsapi_app.hpp:237
void SystemClock_Config(void)
System Clock Configuration.
Definition: variant.cpp:208
#define CMD_GAMMA_SET
Definition: st7789v.c:22
png_uint_32 PNGAPI png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr)
Definition: pngget.c:52
#define Y_STEP_Pin
Definition: main.h:145
#define LAST_MODIFY
Definition: connect.cpp:15
const uint8_t * resource_ptr(uint16_t id)
Definition: guitypes.c:168
HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim)
void st7789v_draw_icon(point_ui16_t pt, uint16_t id_res, color_t clr0, uint8_t rop)
Definition: st7789v.c:646
#define DMA_FIFOMODE_DISABLE
Definition: stm32f4xx_hal_dma.h:320
uint32_t Tacho_FAN0
Definition: main.c:152
void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
DSTATUS USBH_status(BYTE)
Gets Disk Status.
Definition: usbh_diskio.c:111
#define WINDOW_FLG_DISABLED
Definition: window.h:30
display_t * display
Definition: display.c:6
void DMA2_Stream2_IRQHandler(void)
This function handles DMA2 stream2 global interrupt.
Definition: stm32f4xx_it.c:258
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
Initialize the low level portion of the host driver.
Definition: usbh_conf.c:191
Message which must be returned from coroutine generator.
Definition: lwsapi_app.hpp:211
color_t window_get_color_text(int16_t id)
Definition: window.c:469
uint16_t h
Definition: guitypes.h:73
#define ALIGN_VCENTER
Definition: guitypes.h:15
uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev)
USBD_CDC_DataOut Data received on non-control Out endpoint.
Definition: usbd_cdc.c:846
rect_ui16_t rect
Definition: window.h:101
DMA_HandleTypeDef hdma_usart6_rx
Definition: main.c:95
USBD_CDC_ItfTypeDef USBD_Interface_fops_FS
Definition: usbd_cdc_if.c:174
void HAL_ResumeTick(void)
Resume Tick increment.
Definition: stm32f4xx_hal_timebase_tim.c:125
#define DMA_CHANNEL_5
Definition: stm32f4xx_hal_dma.h:223
uint32_t Prescaler
Definition: stm32f4xx_hal_tim.h:65
Definition: connection.hpp:25
void MX_LWIP_Init(void)
Definition: lwip.c:95
uint16_t window_user_class_count
Definition: window.c:42
uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the configuration string descriptor.
Definition: usbd_desc.c:327
#define __HAL_RCC_USART1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:587
bool close
Definition: connect.cpp:161
#define MSGBOX_RES_OK
Definition: window_msgbox.h:46
struct netif * netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
Definition: netif.c:241
window_t win
Definition: window_frame.h:19
const window_class_list_t window_class_list
Definition: window_list.c:149
#define WINDOW_CLS_ICON
Definition: window.h:12
void MemManage_Handler(void)
This function handles Memory management fault.
Definition: stm32f4xx_it.c:121
uint32_t FirstBit
Definition: stm32f4xx_hal_spi.h:90
#define TIM1_default_Period
Definition: timer_defaults.h:11
const uint8_t APBPrescTable[8]
Definition: system_stm32f4xx.c:138
#define SCSI_ASC_LOGICAL_UNIT_NOT_READY
Definition: usbh_msc_scsi.h:129
int main(void)
The application entry point.
Definition: main.c:161
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
size_t end_of_header
Definition: connection.hpp:36
s8_t err_t
Definition: err.h:57
#define MINIMAL_REQUEST_LENGTH
Definition: connection.hpp:8
DSTATUS USBH_initialize(BYTE)
Initializes a Drive.
Definition: usbh_diskio.c:100
uint16_t id_icon
Definition: window_msgbox.h:76
#define SCSI_ASC_NOT_READY_TO_READY_CHANGE
Definition: usbh_msc_scsi.h:134
#define LCD_RST_Pin
Definition: main.h:155
uint32_t Pulse
Definition: stm32f4xx_hal_tim.h:97
USBH_StatusTypeDef
Definition: usbh_def.h:302
USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size)
Prepares an endpoint for reception.
Definition: usbd_conf.c:664
uint32_t DataSize
Definition: stm32f4xx_hal_spi.h:71
uint32_t f_capture
Definition: window.h:90
#define USB_DEVICE_CAPABITY_TYPE
Definition: usbd_def.h:111
const char * file_name
Definition: connect.cpp:45
void window_set_min(int16_t id, float min)
Definition: window.c:682
const uint16_t resource_count
#define USBD_VID
Definition: usbd_desc.c:94
display_draw_rect_t * draw_rect
Definition: display.h:32
const uint8_t * buffer() const
return internal string buffer as array of bytes
Definition: connect.cpp:141
void window_invalidate_children(int16_t id)
Definition: window.c:320
#define TIM3_default_Prescaler
Definition: timer_defaults.h:12
uint32_t AHBCLKDivider
Definition: stm32f4xx_hal_rcc.h:101
void delay(uint32_t ms)
Definition: wiring_time.c:42
#define GET_SECTOR_SIZE
Definition: onboard_sd.h:64
uint32_t OCNIdleState
Definition: stm32f4xx_hal_tim.h:116
#define SPI_MODE_MASTER
Definition: stm32f4xx_hal_spi.h:181
unsigned long DWORD
Definition: onboard_sd.h:15
#define MSGBOX_BTN_CUSTOM3
Definition: window_msgbox.h:28
#define lwsapi_free(arg)
Definition: lwsapi_app.hpp:44
void window_frame_event(window_frame_t *window, uint8_t event, void *param)
Definition: window_frame.c:27
SPI_InitTypeDef Init
Definition: stm32f4xx_hal_spi.h:124
static void MX_SPI3_Init(void)
SPI3 Initialization Function.
Definition: main.c:475
uint32_t HwFlowCtl
Definition: stm32f4xx_hal_uart.h:87
void term_set_attr(term_t *pt, uint8_t attr)
Definition: term.c:97
void SystemCoreClockUpdate(void)
Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable cont...
Definition: system_stm32f4xx.c:238
#define WINDOW_CLS_TEXT
Definition: window.h:10
uint32_t OCMode
Definition: stm32f4xx_hal_tim.h:94
#define CMD_RASET
Definition: st7789v.c:26
#define GUI_DELAY_MAX
Definition: gui.c:74
: Header for usbd_cdc_if.c file.
FRESULT
Definition: ff.h:214
USBH_StatusTypeDef USBH_Start(USBH_HandleTypeDef *phost)
USBH_Start Start the USB Host Core.
Definition: usbh_core.c:333
void st7789v_spi_wr_bytes(uint8_t *pb, uint16_t size)
Definition: st7789v.c:167
#define THERM_0_GPIO_Port
Definition: main.h:98
USBH_StatusTypeDef USBH_LL_SetToggle(USBH_HandleTypeDef *phost, uint8_t pipe, uint8_t toggle)
Set toggle for a pipe.
Definition: usbh_conf.c:564
#define RCC_OSCILLATORTYPE_HSE
Definition: stm32f4xx_hal_rcc.h:125
void window_spin_init(window_spin_t *window)
Definition: window_spin.c:12
uint32_t StopBits
Definition: stm32f4xx_hal_uart.h:74
int16_t screen_stack[SCREEN_MAX_HISTORY]
Definition: screen.c:15
int32_t jogwheel_encoder_min
Definition: jogwheel.c:11
#define RCC_SYSCLK_DIV1
Definition: stm32f4xx_hal_rcc.h:243
#define PNG_LIBPNG_VER_STRING
Definition: png.h:280
DMA_HandleTypeDef hdma_usart6_rx
Definition: main.c:95
#define APP_TX_DATA_SIZE
Definition: usbd_cdc_if.c:101
USBH_StatusTypeDef USBH_RegisterClass(USBH_HandleTypeDef *phost, USBH_ClassTypeDef *pclass)
USBH_RegisterClass Link class driver to Host Core.
Definition: usbh_core.c:199
#define URI_LENGTH
maximum length of request uri
Definition: lwsapi_app.hpp:39
float min
Definition: window_progress.h:26
#define __HAL_RCC_GPIOC_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:416
#define GPIO_PIN_5
Definition: stm32f4xx_hal_gpio.h:107
void st7789v_enable_safe_mode(void)
enable safe mode (direct acces + safe delay)
Definition: st7789v.c:923
function completed; signal event occurred.
Definition: cmsis_os.h:236
uint32_t f_visible
Definition: window.h:85
void screen_stack_push(int16_t screen_id)
Definition: screen.c:48
Definition: window_list.h:11
const uint8_t index_html[]
Definition: index_html.c:3
#define WINDOW_EVENT_CLICK
Definition: window.h:46
uint32_t NbrOfConversion
Definition: stm32f4xx_hal_adc.h:100
#define MSGBOX_RES_RETRY
Definition: window_msgbox.h:42
int16_t window_next(int16_t id)
Definition: window.c:192
float window_get_value(int16_t id)
Definition: window.c:390
const window_class_list_t window_class_list
Definition: window_list.c:149
screen_t * screen_unregister(int16_t screen_id)
Definition: screen.c:43
#define USB_FS_P_Pin
Definition: main.h:163
void window_frame_draw(window_frame_t *window)
Definition: window_frame.c:15
I2C_TypeDef * Instance
Definition: stm32f4xx_hal_i2c.h:166
#define WINDOW_FLG_FOCUSED
Definition: window.h:27
#define WINDOW_MAX_WINDOWS
Definition: window.c:6
uint32_t EOCSelection
Definition: stm32f4xx_hal_adc.h:90
const resource_entry_t resource_table[]
const uint16_t size
Definition: guitypes.h:103
uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, USBD_CDC_ItfTypeDef *fops)
USBD_CDC_RegisterInterface.
Definition: usbd_cdc.c:790
int16_t win_id
Definition: gui_timer.c:29
void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
Data Out stage callback.
Definition: usbd_conf.c:162
sio_fd_t sio_open(u8_t devnum)
#define USBH_MSC_CLASS
Definition: usbh_msc.h:173
File handler structure.
Definition: connect.cpp:44
: Header for main.c file. This file contains the common defines of the application.
#define _565_COLOR(clr)
Definition: st7789v.c:68
void PNGAPI png_init_io(png_structrp png_ptr, png_FILE_p fp)
Definition: png.c:703
Header for usbh_diskio.c module.
#define Len
Definition: deflate.h:82
uint32_t DiscontinuousConvMode
Definition: stm32f4xx_hal_adc.h:103
void PNGAPI png_read_info(png_structrp png_ptr, png_inforp info_ptr)
Definition: pngread.c:92
window_event_t * event
Definition: window.h:102
#define USBD_IDX_SERIAL_STR
Definition: usbd_def.h:69
int8_t gui_get_menu_timeout_id(void)
Definition: gui_timer.c:147
uint8_t st7789v_read_ctrl(void)
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
TIM_HandleTypeDef htim3
Definition: main.c:87
size_t png_alloc_size_t
Definition: pngconf.h:557
#define ST7789V_FLG_DMA
Definition: st7789v.h:9
#define CMD_COLMOD
Definition: st7789v.c:32
This file contains all the functions prototypes for the HAL module driver.
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
#define Y_DIR_Pin
Definition: main.h:143
uint32_t ExternalTrigConvEdge
Definition: stm32f4xx_hal_adc.h:114
#define ST7789V_ROWS
Definition: st7789v.c:15
#define TIM_MASTERSLAVEMODE_DISABLE
Definition: stm32f4xx_hal_tim.h:716
DMA_HandleTypeDef hdma_spi2_tx
Definition: main.c:83
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConfTypeDef *sConfig)
void window_spin_event(window_spin_t *window, uint8_t event, void *param)
Definition: window_spin.c:22
IHeader *(* header_factory_fn)(const char *key, const char *value, size_t value_length)
Definition: lwsapi_app.hpp:251
static void MX_TIM2_Init(void)
TIM2 Initialization Function.
Definition: main.c:580
void window_set_min_max_step(int16_t id, float min, float max, float step)
Definition: window.c:767
USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev)
USBD_DevDisconnected Handle device disconnection event.
Definition: usbd_core.c:542
#define USBD_MAX_STR_DESC_SIZ
Definition: usbd_conf.h:99
uint16_t window_get_icon_id(int16_t id)
Definition: window.c:671
#define __HAL_RCC_I2C1_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:540
int16_t window_next_enabled(int16_t id)
Definition: window.c:211
#define COLOR_BLACK
Definition: guitypes.h:40
#define TIM_OCPOLARITY_HIGH
Definition: stm32f4xx_hal_tim.h:386
char * format
Definition: window_progress.h:24
#define USB_DEFAULT_BLOCK_SIZE
Definition: usbh_diskio.c:59
static int8_t CDC_Init_FS(void)
Initializes the CDC media low layer over the FS USB IP.
Definition: usbd_cdc_if.c:186
void putslave_init(uartslave_t *pslave)
Definition: putslave.c:619
window_numb_t window
Definition: window_spin.h:13
u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len)
int index
Definition: window_list.h:24
#define COLOR_RED_ALERT
Definition: guitypes.h:43
Universal response class with internal buffer size by BUFFER_RESPONSE_SIZE.
Definition: connect.cpp:119
FileResponse(const FileHandler_t *handler)
Definition: connect.cpp:94
#define CMD_WRDISBV
Definition: st7789v.c:34
#define DMA_PERIPH_TO_MEMORY
Definition: stm32f4xx_hal_dma.h:244
#define ST7789V_FLG_SAFE
Definition: st7789v.h:11
static status_t status
Definition: filament_sensor.c:37
uint32_t Parity
Definition: stm32f4xx_hal_uart.h:77
int length() const
return length of internal string buffer
Definition: connect.cpp:146
uint8_t st7789v_gamma_get(void)
uint32_t LSIState
Definition: stm32f4xx_hal_rcc.h:84
void gui_timer_reset(int8_t id)
Definition: gui_timer.c:133
void HAL_HCD_Disconnect_Callback(HCD_HandleTypeDef *hhcd)
SOF callback.
Definition: usbh_conf.c:165
TIM_HandleTypeDef htim14
Definition: main.c:88
int _wait(int *status)
Definition: syscalls.c:148
size_t m_position
Definition: connection.hpp:34
void window_numb_draw(window_numb_t *window)
Definition: window_numb.c:17
int16_t window_new_id(window_t *window)
Definition: window.c:44
uint32_t WordLength
Definition: stm32f4xx_hal_uart.h:71
#define CMD_WRCTRLD
Definition: st7789v.c:36
Environment env
Definition: connection.hpp:31
#define __HAL_RCC_DMA1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:430
screen_init_t * init
Definition: screen.h:21
USBD_StatusTypeDef
Definition: usbd_def.h:194
const uint8_t connect_black_svg[]
Definition: connect_black_svg.c:3
uint32_t Pin
Definition: stm32f4xx_hal_gpio.h:65
uint32_t MasterOutputTrigger
Definition: stm32f4xx_hal_tim_ex.h:84
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
UART MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:683
Definition: connect.cpp:157
uint32_t ClockType
Definition: stm32f4xx_hal_rcc.h:95
window_t * window_capture_ptr
Definition: window.c:21
#define __HAL_RCC_PWR_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:528
uint32_t flg
Definition: guitypes.h:80
display_draw_icon_t * draw_icon
Definition: display.h:36
uint32_t Speed
Definition: stm32f4xx_hal_gpio.h:74
void DMA1_Stream4_IRQHandler(void)
This function handles DMA1 stream4 global interrupt.
Definition: stm32f4xx_it.c:179
Definition: guitypes.h:101
#define DMA_PRIORITY_LOW
Definition: stm32f4xx_hal_dma.h:308
uint16_t st7789v_y
Definition: st7789v.c:78
#define I2C_NOSTRETCH_DISABLE
Definition: stm32f4xx_hal_i2c.h:266
void HAL_NVIC_DisableIRQ(IRQn_Type IRQn)
IWDG_InitTypeDef Init
Definition: stm32f4xx_hal_iwdg.h:80
int8_t gui_timer_expired(int8_t id)
Definition: gui_timer.c:139
void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
SOF callback.
Definition: usbd_conf.c:181
static void gpio_set(uint8_t pin8, int state)
Definition: gpio.h:98
int16_t id
Definition: screen.h:19
#define RCC_FLAG_IWDGRST
Definition: stm32f4xx_hal_rcc.h:379
const char * text
Definition: window_msgbox.h:77
void MX_FATFS_Init(void)
Definition: fatfs.c:60
#define ST7789V_SIG_SPI_TX
Definition: guiconfig.h:18
uint32_t ScanConvMode
Definition: stm32f4xx_hal_adc.h:83
void st7789v_init_ctl_pins(void)
Definition: st7789v.c:300
int res
Definition: window_msgbox.h:80
void window_draw_children(int16_t id)
Definition: window.c:284
#define bsod(fmt,...)
Definition: bsod.h:20
window_t * window_1
Definition: window.c:14
FRESULT f_mount(FATFS *fs, const TCHAR *path, BYTE opt)
Definition: ff.c:3248
#define USB_SIZ_BOS_DESC
Definition: usbd_desc.c:103
uint32_t f_focused
Definition: window.h:88
TIM Time Base Handle Structure definition.
Definition: stm32f4xx_hal_tim.h:287
#define RCC_SYSCLKSOURCE_PLLCLK
Definition: stm32f4xx_hal_rcc.h:221
osThreadId measurementTaskHandle
Definition: main.c:102
uint32_t ClockSpeed
Definition: stm32f4xx_hal_i2c.h:65
#define ESP_TX_Pin
Definition: main.h:151
USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed)
USBD_LL_Reset Handle Reset event.
Definition: usbd_core.c:451
uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Returns Stall condition.
Definition: usbd_conf.c:580
font_t * font
Definition: window_term.h:19
#define __HAL_RCC_USART2_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:539
uint32_t gui_timers_cycle(void)
Definition: gui_timer.c:98
#define UART_STOPBITS_1
Definition: stm32f4xx_hal_uart.h:227
uint32_t BaudRatePrescaler
Definition: stm32f4xx_hal_spi.h:84
void * mem_malloc(mem_size_t size)
Definition: mem.c:603
void HAL_HCD_MspInit(HCD_HandleTypeDef *hcdHandle)
Definition: usbh_conf.c:89
color_t color_back
Definition: window_list.h:17
Definition: window_term.h:15
uint16_t x
Definition: guitypes.h:70
const window_class_progress_t window_class_progress
Definition: window_progress.c:61
void StartMeasurementTask(void const *argument)
Definition: thread_measurement.c:7
#define BUFFER_RESPONSE_SIZE
Definition: connect.cpp:116
void * pData
Definition: usbh_def.h:463
#define SCSI_ASC_WRITE_PROTECTED
Definition: usbh_msc_scsi.h:131
int _fork(void)
Definition: syscalls.c:172
uint16_t w
Definition: display.h:25
void window_set_focus(int16_t id)
Definition: window.c:480
void st7789v_cmd_ramrd(uint8_t *pdata, uint16_t size)
Definition: st7789v.c:277
void ETH_IRQHandler(void)
This function handles Ethernet global interrupt.
Definition: stm32f4xx_it.c:271
#define GET_BLOCK_SIZE
Definition: onboard_sd.h:65
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
static const char * HTTP_10
Definition: connection.cpp:8
window_class_t * class_ptr(int16_t cls_id)
Definition: window.c:73
gui_defaults_t gui_defaults
Definition: gui.c:20
rect_ui16_t rect_ui16_sub_padding_ui8(rect_ui16_t rc, padding_ui8_t pad)
Definition: guitypes.c:55
#define TERM_FLG_FREEMEM
Definition: term.h:28
int32_t index
Definition: window_menu.h:54
static uint16_t set_num_of_ones(uint8_t num_of_ones)
Definition: st7789v.c:392
int window_is_enabled(int16_t id)
Definition: window.c:257
static void st7789v_clr_rst(void)
Definition: st7789v.c:132
unsigned char BYTE
Definition: onboard_sd.h:13
HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, TIM_ClockConfigTypeDef *sClockSourceConfig)
#define GUI_MENU_TIMEOUT
Definition: gui_timer.c:13
const char * buttons[3]
Definition: window_msgbox.h:78
color_t color_back
Definition: window_term.h:17
#define WINDOW_EVENT_LOOP
Definition: window.h:49
uint32_t Tacho_FAN1
Definition: main.c:153
void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len)
USBD_GetString Convert Ascii string into unicode one.
Definition: usbd_ctlreq.c:732
color_t window_get_color_back(int16_t id)
Definition: window.c:446
static void MX_USART6_UART_Init(void)
USART6 Initialization Function.
Definition: main.c:773
rect_ui16_t rect_ui16_add_padding_ui8(rect_ui16_t rc, padding_ui8_t pad)
Definition: guitypes.c:46
#define SWAPBW_TOLERANCE
Definition: st7789v.c:592
uint32_t DualAddressMode
Definition: stm32f4xx_hal_i2c.h:77
HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c)
padding_ui8_t padding
Definition: window_progress.h:21
float value
Definition: window_progress.h:25
void window_set_item_count(int16_t id, int count)
Definition: window.c:573
USBH_SpeedTypeDef
Definition: usbh_def.h:317
Clock Configuration Handle Structure definition.
Definition: stm32f4xx_hal_tim.h:214
uint16_t st7789v_reset_delay
Definition: st7789v.c:920
#define TERM_DEF_CHAR
Definition: term.h:33
window_t * window_capture_ptr
Definition: window.c:21
#define png_jmpbuf(png_ptr)
Definition: png.h:952
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
int
Definition: createSpeedLookupTable.py:15
window_t * window_1
Definition: window.c:14
uint32_t CRCCalculation
Definition: stm32f4xx_hal_spi.h:96
#define LCD_CS_Pin
Definition: main.h:157
DRESULT
Definition: onboard_sd.h:22
int window_get_item_count(int16_t id)
Definition: window.c:585
uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff)
USBD_CDC_SetRxBuffer.
Definition: usbd_cdc.c:829
TIM_Base_InitTypeDef Init
Definition: stm32f4xx_hal_tim.h:290
const uint16_t window_class_count
Definition: window.c:38
int _execve(char *name, char **argv, char **env)
Definition: syscalls.c:177
uint32_t BreakPolarity
Definition: stm32f4xx_hal_tim_ex.h:106
uint16_t window_msgbox_id_icon[5]
Definition: window_msgbox.c:62
Definition: usbh_def.h:306
void window_invalidate_children(int16_t id)
Definition: window.c:320
void st7789v_cmd(uint8_t cmd, uint8_t *pdata, uint16_t size)
Definition: st7789v.c:206
int32_t jogwheel_encoder_max
Definition: jogwheel.c:12
uint32_t Direction
Definition: stm32f4xx_hal_spi.h:68
color_t st7789v_get_pixel(point_ui16_t pt)
Definition: st7789v.c:373
font_t * font
Definition: window_text.h:19
#define UART_WORDLENGTH_8B
Definition: stm32f4xx_hal_uart.h:218
void window_progress_draw(window_progress_t *window)
Definition: window_progress.c:21
void * gui_malloc(unsigned int size)
Definition: gui.c:35
#define GUI_TIMER_PERI
Definition: gui_timer.c:12
#define MSGBOX_RES_IGNORE
Definition: window_msgbox.h:43
Definition: usbh_def.h:305
void sio_send(u8_t c, sio_fd_t fd)
static color_t color_rgb(uint8_t r, uint8_t g, uint8_t b)
Definition: guitypes.h:128
HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
uint32_t color_t
Definition: guitypes.h:62
void HAL_Delay(uint32_t Delay)
This function provides minimum delay (in milliseconds) based on variable incremented.
Definition: stm32f4xx_hal.c:393
#define __HAL_RCC_ADC1_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:640
#define THERM_PINDA_Pin
Definition: main.h:107
#define COLOR_SILVER
Definition: guitypes.h:49
font_t * font_big
Definition: guitypes.h:111
USBD_SpeedTypeDef
Definition: usbd_def.h:186
void TIM6_DAC_IRQHandler(void)
This function handles TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts.
Definition: stm32f4xx_it.c:232
#define DMA_NORMAL
Definition: stm32f4xx_hal_dma.h:297
#define DMA_PDATAALIGN_BYTE
Definition: stm32f4xx_hal_dma.h:275
char USBHPath[4]
Definition: fatfs.c:52
void() window_init_t(void *window)
Definition: window.h:55
uint32_t APB2CLKDivider
Definition: stm32f4xx_hal_rcc.h:107
RCC Internal/External Oscillator (HSE, HSI, LSE and LSI) configuration structure definition.
Definition: stm32f4xx_hal_rcc.h:67
color_t color_text
Definition: window_text.h:18
const display_t st7789v_display
Definition: st7789v.c:889
#define HAL_MAX_DELAY
Definition: stm32f4xx_hal_def.h:76
DMA_HandleTypeDef hdma_usart1_rx
Definition: main.c:93
void st7789v_brightness_set(uint8_t brightness)
#define TERM_BUFF_SIZE(c, r)
Definition: term.h:36
#define TIM_LOCKLEVEL_OFF
Definition: stm32f4xx_hal_tim.h:651
USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
USBD_IsoOUTIncomplete Handle iso out incomplete event.
Definition: usbd_core.c:520
#define TIM_OSSI_DISABLE
Definition: stm32f4xx_hal_tim.h:643
#define HSE_VALUE
Definition: system_stm32f4xx.c:67
gui_defaults_t gui_defaults
Definition: gui.c:20
#define X_STEP_Pin
Definition: main.h:179
#define GPIO_MODE_INPUT
Definition: stm32f4xx_hal_gpio.h:135
int8_t gui_timer_new(uint8_t timer, uint32_t ms, int16_t win_id)
Definition: gui_timer.c:38
void render_icon_align(rect_ui16_t rc, uint16_t id_res, color_t clr0, uint16_t flags)
Definition: display_helper.c:55
#define WINDOW_EVENT_BTN_DN
Definition: window.h:38
DMA_HandleTypeDef * hdmatx
Definition: stm32f4xx_hal_spi.h:142
#define Z_DIAGE1_Pin
Definition: main.h:199
union osEvent::@54 value
event value
void window_frame_done(window_frame_t *window)
Definition: window_frame.c:12
USBH_StatusTypeDef USBH_LL_Connect(USBH_HandleTypeDef *phost)
USBH_LL_Connect Handle USB Host connexion event.
Definition: usbh_core.c:826
ETH_HandleTypeDef heth
Definition: ethernetif.c:108
Definition: usb_host.h:87
SPI_HandleTypeDef hspi2
Definition: main.c:81
#define I2C_ADDRESSINGMODE_7BIT
Definition: stm32f4xx_hal_i2c.h:239
#define SCSI_ASC_MEDIUM_NOT_PRESENT
Definition: masstorage.h:155
USBH_StatusTypeDef USBH_LL_ClosePipe(USBH_HandleTypeDef *phost, uint8_t pipe)
Close a pipe of the low level driver.
Definition: usbh_conf.c:422
uint8_t is_inverted
Definition: st7789v.h:30
#define DMA_CHANNEL_4
Definition: stm32f4xx_hal_dma.h:222
int top_index
Definition: window_list.h:25
point_ui16_t font_meas_text(font_t *pf, const char *str)
Definition: guitypes.c:97
#define _COLOR_565(clr)
Definition: st7789v.c:66
void() window_list_item_t(window_list_t *pwindow_list, uint16_t index, const char **pptext, uint16_t *pid_icon)
Definition: window.h:61
void add_header(IHeader *header)
Definition: lwsapi.cpp:28
#define WINDOW_EVENT_TIMER
Definition: window.h:50
#define HW_IDENTIFY_Pin
Definition: main.h:101
int16_t window_create(int16_t cls_id, int16_t id_parent, rect_ui16_t rect)
Definition: window.c:98
window_t * windows[WINDOW_MAX_WINDOWS]
Definition: window.c:16
USBH_HandleTypeDef hUsbHostHS
Definition: usb_host.c:74
args
Definition: createSpeedLookupTable.py:17
Disk IO Driver structure definition.
Definition: ff_gen_drv.h:67
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
This function configures the TIM6 as a time base source. The time source is configured to have 1ms ti...
Definition: stm32f4xx_hal_timebase_tim.c:62
uint8_t * USBD_FS_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Return the LangID string descriptor.
Definition: usbd_desc.c:275
void window_validate_children(int16_t id)
Definition: window.c:312
char asc_min
Definition: guitypes.h:82
#define Z_MIN_GPIO_Port
Definition: main.h:160
#define WINDOW_FLG_FREEMEM
Definition: window.h:31
This file contains all the prototypes for the usbh_msc.c.
void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
ISOOUTIncomplete callback.
Definition: usbd_conf.c:250
#define USB_HS_P_Pin
Definition: main.h:133
#define EOF
Definition: ff.h:286
uint8_t height_progress
Definition: window_progress.h:23
png_uint_32 length
Definition: png.c:2247
void mem_free(void *rmem)
Definition: mem.c:419
uint32_t NSS
Definition: stm32f4xx_hal_spi.h:80
uint32_t OffStateRunMode
Definition: stm32f4xx_hal_tim_ex.h:96
HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout)
USBH_StatusTypeDef USBH_Init(USBH_HandleTypeDef *phost, void(*pUsrFunc)(USBH_HandleTypeDef *phost, uint8_t), uint8_t id)
HCD_Init Initialize the HOST Core.
Definition: usbh_core.c:92
void diag_check_fastboot(void)
Definition: diag.c:23
UART handle Structure definition.
Definition: stm32f4xx_hal_uart.h:158
uint8_t alignment
Definition: guitypes.h:113
Definition: window_list.h:15
size_t request_length
Definition: connect.cpp:160
int _read(int file, char *ptr, int len)
Definition: syscalls.c:86
USBH_URBStateTypeDef
Definition: usbh_def.h:384
uint32_t OverSampling
Definition: stm32f4xx_hal_uart.h:91
#define FLG_CS
Definition: st7789v.c:71
void PNGAPI png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
Definition: pngread.c:383
int16_t window_next_enabled(int16_t id)
Definition: window.c:211
static int point_in_rect_ui16(point_ui16_t pt, rect_ui16_t rc)
Definition: guitypes.h:169
FILE * file
Definition: term.h:52
#define FONT_FLG_LSBF
Definition: guitypes.h:37
uint16_t flags
Definition: window_msgbox.h:79
uint8_t flg
Definition: st7789v.h:24
void window_hide(int16_t id)
Definition: window.c:539
struct _window_numb_t window_numb_t
#define PWR_REGULATOR_VOLTAGE_SCALE1
Definition: stm32f4xx_hal_pwr_ex.h:90
uint32_t MemDataAlignment
Definition: stm32f4xx_hal_dma.h:83
TIM_HandleTypeDef htim1
Definition: main.c:85
IHeader * request_header(const char *key, size_t key_length, const char *value, size_t value_length)
request_header_fn callbacke, which is call from LwIP WSAPI http server
Definition: connect.cpp:289
int16_t window_focused(void)
Definition: window.c:165
#define HSI_VALUE
Definition: system_stm32f4xx.c:71
uint32_t f_reserved0
Definition: gui_timer.c:25
void st7789v_set_pixel_directColor(point_ui16_t pt, uint16_t directColor)
Definition: st7789v.c:383
#define Y_ENA_Pin
Definition: main.h:147
uartrxbuff_t uart6rxbuff
Definition: main.c:147
#define USBD_PID_FS
Definition: usbd_desc.c:97
void window_list_draw(window_list_t *window)
Definition: window_list.c:45
void MX_LWIP_Init(void)
Definition: lwip.c:95
uint32_t USBH_LL_GetLastXferSize(USBH_HandleTypeDef *phost, uint8_t pipe)
Return the last transfered packet size.
Definition: usbh_conf.c:373
void st7789v_inversion_off(void)
#define FLASH_CSN_Pin
Definition: main.h:187
#define LCD_SW1_Pin
Definition: main.h:122
void window_msgbox_click(window_msgbox_t *window)
Definition: window_msgbox.c:130
#define ESP_GPIO0_Pin
Definition: main.h:93
uint32_t PLLN
Definition: stm32f4xx_hal_rcc_ex.h:74
#define CDC_SEND_BREAK
Definition: usbd_cdc.h:79
window_t win
Definition: window_progress.h:16
void st7789v_draw_rect(rect_ui16_t rc, color_t clr)
Definition: st7789v.c:479
rect_ui16_t rect_intersect_ui16(rect_ui16_t rc, rect_ui16_t rc1)
Definition: guitypes.c:37
static void MX_IWDG_Init(void)
IWDG Initialization Function.
Definition: main.c:413
int content_length
Definition: connect.cpp:47
#define CMD_RAMRD
Definition: st7789v.c:28
const uint8_t * data
Definition: connect.cpp:48
#define TIM1_default_Prescaler
Definition: timer_defaults.h:10
uint32_t MasterSlaveMode
Definition: stm32f4xx_hal_tim_ex.h:87
#define SPI_DATASIZE_8BIT
Definition: stm32f4xx_hal_spi.h:199
gui_timer_t gui_timers[GUI_MAX_TIMERS]
Definition: gui_timer.c:34
#define MSGBOX_MSK_ICO
Definition: window_msgbox.h:8
void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
Disconnect callback.
Definition: usbd_conf.c:278
Definition: window_menu.h:35
const window_class_t * window_classes[]
Definition: window.c:23
static uint16_t rd18bit_to_16bit(uint8_t *buff)
Definition: st7789v.c:418
uint32_t Mode
Definition: stm32f4xx_hal_spi.h:65
uint32_t flg
Definition: window.h:81
#define __HAL_RCC_USART2_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:507
void st7789v_cmd_ramwr(uint8_t *pdata, uint16_t size)
Definition: st7789v.c:273
: Header for usbd_conf.c file.
const window_class_spin_t window_class_spin
Definition: window_spin.c:58
void media_set_inserted(bool inserted)
Definition: Marlin_CardReader.cpp:21
list b
Definition: createSpeedLookupTable.py:30
uint16_t st7789v_cy
Definition: st7789v.c:80
priority: normal (default)
Definition: cmsis_os.h:221
USBD_HandleTypeDef hUsbDeviceFS
Definition: usb_device.c:73
void screen_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: screen.c:103
int16_t window_parent(int16_t id)
Definition: window.c:173
Definition: window_progress.h:15
void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency)
const uint8_t window_msgbox_button_count[]
Definition: window_msgbox.c:17
const uint8_t AHBPrescTable[16]
Definition: system_stm32f4xx.c:137
#define WP1_Pin
Definition: main.h:197
void app_tim6_tick(void)
Definition: appmain.cpp:157
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__)
Definition: stm32f4xx_hal_def.h:81
font_t * font
Definition: window_list.h:19
int16_t window_capture(void)
Definition: window.c:169
#define DMA_MEMORY_TO_PERIPH
Definition: stm32f4xx_hal_dma.h:245
#define GPIO_PIN_9
Definition: stm32f4xx_hal_gpio.h:111
Definition: onboard_sd.h:26
ConstHeader ct_header
Definition: connect.cpp:122
void st7789v_gamma_next(void)
uint32_t ClockSource
Definition: stm32f4xx_hal_tim.h:216
display_draw_line_t * draw_line
Definition: display.h:31
static int8_t CDC_Control_FS(uint8_t cmd, uint8_t *pbuf, uint16_t length)
Manage the CDC class requests.
Definition: usbd_cdc_if.c:214
void term_set_pos(term_t *pt, uint8_t col, uint8_t row)
Definition: term.c:103
const char * response
Definition: connect.cpp:121
osThreadId displayTaskHandle
Definition: main.c:98
window_class_t * cls
Definition: window.h:77
void window_set_capture(int16_t id)
Definition: window.c:500
Header of cmsis_os.c A new set of APIs are added in addition to existing ones, these APIs are specifi...
uint32_t NoStretchMode
Definition: stm32f4xx_hal_i2c.h:86
window_t win
Definition: window_numb.h:18
USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
USBD_IsoINIncomplete Handle iso in incomplete event.
Definition: usbd_core.c:509
int8_t menu_timeout_enabled
Definition: guimain.c:103
const uint8_t status_z_axis_svg[]
Definition: status_z_axis_svg.c:3
DMA_HandleTypeDef * hdmarx
Definition: stm32f4xx_hal_uart.h:178
int16_t window_focused(void)
Definition: window.c:165
HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size)
Definition: usbd_def.h:195
#define USBD_LANGID_STRING
Definition: usbd_desc.c:95
unsigned int UINT
Definition: onboard_sd.h:16
#define Z_ENA_Pin
Definition: main.h:181
void HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd)
SOF callback.
Definition: usbh_conf.c:156
Definition: uartrxbuff.h:16
const window_class_numb_t window_class_numb
Definition: window_numb.c:41
Temperature thermalManager
Definition: temperature.cpp:89
#define BED_MON_Pin
Definition: main.h:113
err_t parse_request(const void *data=nullptr, size_t length=0)
parste the request header (request line + request headers)
Definition: connection.cpp:110
#define WINDOW_FLG_INVALID
Definition: window.h:26
USBD_DescriptorsTypeDef FS_Desc
Definition: usbd_desc.c:160
#define HEAT0_Pin
Definition: main.h:111
virtual Message_t generator(const struct pbuf *input=nullptr) override
WSAPI generator (called more time from WSAPI http server).
Definition: connect.cpp:168
#define __HAL_RCC_GET_FLAG(__FLAG__)
Definition: stm32f4xx_hal_rcc.h:1246
uint32_t f_tag
Definition: window.h:98
uint8_t pinEN1
Definition: jogwheel.h:21
#define WINDOW_FLG_ENABLED
Definition: window.h:25
#define ALIGN_HCENTER
Definition: guitypes.h:11
HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
void StartDisplayTask(void const *argument)
Function implementing the displayTask thread.
Definition: main.c:980
static void _window_invalidate(window_t *window)
Definition: window.h:257
USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup)
USBD_SetupStage Handle the setup stage.
Definition: usbd_core.c:263
int16_t window_prev_enabled(int16_t id)
Definition: window.c:204
uint16_t screen_stack_count
Definition: screen.c:16
const window_class_icon_t window_class_icon
Definition: window_icon.c:29
#define __HAL_RCC_GPIOA_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:402
#define CDC_GET_ENCAPSULATED_RESPONSE
Definition: usbd_cdc.h:72
uint32_t ExternalTrigConv
Definition: stm32f4xx_hal_adc.h:110
#define __HAL_RCC_USART1_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:638
uint32_t start
Definition: gui_timer.c:19
#define __HAL_RCC_SPI2_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:538
osThreadId osThreadCreate(const osThreadDef_t *thread_def, void *argument)
Create a thread and add it to Active Threads and set it to state READY.
Definition: cmsis_os.c:245
caddr_t _sbrk(int incr)
Definition: syscalls.c:105
UART_InitTypeDef Init
Definition: stm32f4xx_hal_uart.h:162
#define WINDOW_EVENT_ENC_DN
Definition: window.h:40
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
static void st7789v_set_rst(void)
Definition: st7789v.c:127
#define FIL_SENSOR_Pin
Definition: main.h:189
int _stat(char *file, struct stat *st)
Definition: syscalls.c:162
void window_list_event(window_list_t *window, uint8_t event, void *param)
Definition: window_list.c:103
char method[METHOD_LENGTH]
Definition: lwsapi_app.hpp:183
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi)
Definition: main.c:918
uint8_t * buff
Definition: term.h:47
void window_text_draw(window_text_t *window)
Definition: window_text.c:14
int16_t screen_register(screen_t *pscreen)
Definition: screen.c:24
DMA_HandleTypeDef hdma_spi2_tx
Definition: main.c:83
#define GUI_SIG_REDRAW
Definition: guiconfig.h:15
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef *htim_base)
TIM_Base MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32f4xx_hal_msp.c:500
GPIO Init structure definition.
Definition: stm32f4xx_hal_gpio.h:63
int window_get_item_index(int16_t id)
Definition: window.c:623
const window_class_frame_t window_class_frame
Definition: window_frame.c:65
#define FAN0_Pin
Definition: main.h:120
static void MX_TIM14_Init(void)
TIM14 Initialization Function.
Definition: main.c:686
ADC_HandleTypeDef hadc1
Definition: main.c:75
#define TERM_FLG_AUTOCR
Definition: term.h:31
#define CTRL_SYNC
Definition: onboard_sd.h:62
USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev)
USBD_Suspend Handle Suspend event.
Definition: usbd_core.c:464
void UsageFault_Handler(void)
This function handles Undefined instruction or illegal state.
Definition: stm32f4xx_it.c:147
window_t win
Definition: window_text.h:16
uint8_t jogwheel_signals_new
Definition: jogwheel.c:9
void PNGAPI png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
Definition: png.c:47
#define memshift(ptr, size)
Definition: connection.hpp:10
int font_line_chars(font_t *pf, const char *str, uint16_t line_width)
Definition: guitypes.c:122
uint8_t pinENC
Definition: jogwheel.h:23
const window_class_text_t window_class_text
Definition: window_text.c:27
int8_t gui_timer_create_oneshot(uint32_t ms, int16_t win_id)
Definition: gui_timer.c:66
#define GPIO_SPEED_FREQ_LOW
Definition: stm32f4xx_hal_gpio.h:158
#define __HAL_RCC_ADC1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:601
static void st7789v_clr_cs(void)
Definition: st7789v.c:112
int8_t gui_get_menu_timeout_id(void)
Definition: gui_timer.c:147
struct _window_spin_t window_spin_t
const display_t st7789v_display
Definition: st7789v.c:889
USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev)
USBD_DevConnected Handle device connection event.
Definition: usbd_core.c:531
osThreadId displayTaskHandle
Definition: main.c:98
#define osThread(name)
Definition: cmsis_os.h:478
FILE * resource_fopen(uint16_t id, const char *opentype)
Definition: guitypes.c:180
static void st7789v_fill_ui16(uint16_t *p, uint16_t v, uint16_t c)
Definition: st7789v.c:137
static point_ui16_t point_ui16(uint16_t x, uint16_t y)
Definition: guitypes.h:154
const IHeader * headers
Definition: lwsapi_app.hpp:213
void render_icon_align(rect_ui16_t rc, uint16_t id_res, color_t clr0, uint16_t flags)
Definition: display_helper.c:55
State
Definition: connection.hpp:22
void window_msgbox_draw(window_msgbox_t *window)
Definition: window_msgbox.c:158
static png_bytep size_t size
Definition: pngwrite.c:2170
void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
ISOINIncomplete callback.
Definition: usbd_conf.c:260
IResponse::unique_ptr_t api_printer(Environment &env)
return coroutine_fn for /api/printer request
Definition: connect.cpp:226
virtual Message_t generator(const struct pbuf *input=nullptr) override
Response generator, iterative returns file data.
Definition: connect.cpp:195
USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
De-Initializes the low level portion of the device driver.
Definition: usbd_conf.c:324
#define I2C_DUTYCYCLE_2
Definition: stm32f4xx_hal_i2c.h:230
rect_ui16_t rect_align_ui16(rect_ui16_t rc, rect_ui16_t rc1, uint8_t align)
Definition: guitypes.c:64
jogwheel_config_t jogwheel_config
Definition: jogwheel.c:95
#define USB_EN_Pin
Definition: main.h:91
#define ALIGN_HMASK
Definition: guitypes.h:13
void st7789v_brightness_enable(void)
char * buffer
Definition: connection.hpp:33
uint16_t size
Definition: term.h:48
I2C handle Structure definition.
Definition: stm32f4xx_hal_i2c.h:164
void gui_redraw(void)
Definition: gui.c:55
void window_set_color_text(int16_t id, color_t clr)
Definition: window.c:457
void st7789v_inversion_tgl(void)
int32_t signals
signal flags
Definition: cmsis_os.h:400
uint16_t st7789v_get_pixel_directColor(point_ui16_t pt)
Definition: st7789v.c:422
point_ui16_t icon_meas(const uint8_t *pi)
Definition: guitypes.c:155
DMA_HandleTypeDef hdma_usart2_rx
Definition: main.c:94
uint32_t f_freemem
Definition: window.h:93
Header file for usbd_core.c file.
#define ALIGN_VMASK
Definition: guitypes.h:17
#define ALIGN_LEFT_CENTER
Definition: guitypes.h:21
uint8_t alignment
Definition: window_text.h:22
void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
Connect callback.
Definition: usbd_conf.c:269
uint8_t info[12]
Definition: masstorage.h:54