main
	__FillZeros
	Start_TP
		Init_MCU
			GPIO_Digital_Output
				GPIO_Config
					GPIO_Clk_Enable
			TFT_Set_Default_Mode
			TP_TFT_Set_Default_Mode
		InitializeTouchPanel
			Init_ADC
				ADC_Set_Input_Channel
					GPIO_Analog_Input
						GPIO_Config
				ADC1_Init
					ADCx_Init
						RCC_GetClocksFrequency
							Get_Fosc_kHz
			TFT_Init_ILI9341_8bit
				Is_TFT_Set
				TFT_Set_Pen
				TFT_Set_Brush
				TFT_Move_Cursor
				TFT_Set_DataPort_Direction
					GPIO_Config
				TFT_ReadId_ST7789V_or_ILI9341
					TFT_Set_Pin_Directions
						GPIO_Config
					TFT_Set_DataPort_Direction
					TFT_Set_DataPort_Direction_Input
						GPIO_Config
					Read_From_Port
					TFT_Set_Index
						Write_to_Port
					TFT_Write_Command
						Write_to_Port
					TFT_SSD1963_8bit_Set_Index
						Delay_1us
						Write_to_Port
					TFT_SSD1963YT_8bit_Write_Command
						Write_to_Port
						Delay_1us
				TFT_Reset_ST7789V
					TFT_Set_Pin_Directions
					Delay_10ms
					Delay_100ms
					Is_TFT_Rotated_180
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Reset_ILI9341
					TFT_Set_Pin_Directions
					Delay_100ms
					Delay_5ms
					Is_TFT_Rotated_180
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
			TP_TFT_Init
				GPIO_Config
			TP_TFT_Set_ADC_Threshold
		TP_TFT_Set_Calibration_Consts
		InitializeObjects
		DrawScreen
			TFT_Init_ILI9341_8bit
			TP_TFT_Init
			TP_TFT_Set_ADC_Threshold
			TFT_Fill_Screen
				Is_SSD1963_Set
				TFT_Set_Address_SSD1963II
					Is_TFT_Rotated_180
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_SSD1963I
					Is_TFT_Rotated_180
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_SST7715R
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_HX8352A
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_R61526
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_ILI9481
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_ILI9342
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Set_Address_ILI9340
					TFT_Set_Index
					TFT_Write_Command
					TFT_SSD1963_8bit_Set_Index
					TFT_SSD1963YT_8bit_Write_Command
				TFT_Write_Data
					Write_to_Port
				TFT_16bit_Write_Data
				TFT_SSD1963_8bit_Write_Data
					TFT_SSD1963YT_8bit_Write_Command
			DrawCircleButton
				TFT_Set_Brush
				TFT_Set_Pen
				TFT_Circle
					_TFT_Circle_Fill
						TFT_GetCurrentColor
							TFT_Color16bitToRGB
							TFT_RGBToColor16bit
						TFT_Set_Pen
						TFT_H_Line
							Is_SSD1963_Set
							TFT_Dot
								Is_SSD1963_Set
								TFT_Set_Address_SSD1963II
								TFT_Set_Address_SSD1963I
								TFT_Set_Address
								TFT_Set_Address_SST7715R
								TFT_Set_Address_HX8352A
								TFT_Set_Address_R61526
								TFT_Set_Address_ILI9481
								TFT_Set_Address_ILI9342
								TFT_Set_Address_ILI9340
								TFT_Write_Data
								TFT_16bit_Write_Data
								TFT_SSD1963_8bit_Write_Data
							TFT_Set_Address_SSD1963II
							TFT_Set_Address_SSD1963I
							TFT_Set_Address
							TFT_Set_Address_SST7715R
							TFT_Set_Address_HX8352A
							TFT_Set_Address_R61526
							TFT_Set_Address_ILI9481
							TFT_Set_Address_ILI9342
							TFT_Set_Address_ILI9340
							TFT_Write_Data
							TFT_16bit_Write_Data
							TFT_SSD1963_8bit_Write_Data
						TFT_V_Line
							TFT_Dot
					TFT_Dot
				TFT_Set_Font
				TFT_Write_Text_Return_Pos
					_TFT_Get_Char_WidthE
						_TFT_getHeader
					_TFT_Get_Char_Width
						TFT_Set_Font
				TFT_Write_Text
					TFT_Move_Cursor
					_TFT_Write_Char_E
						_TFT_getHeader
						TFT_Dot
					_TFT_Write_Char
						TFT_Set_Font
						TFT_Dot
	Check_TP
		TP_TFT_Press_Detect
			Delay_300us
				Delay_50us
			ADC1_Get_Sample
				ADCx_Get_Sample
					Delay_1us
			ADC2_Get_Sample
				ADCx_Get_Sample
			ADC3_Get_Sample
				ADCx_Get_Sample
		TP_TFT_Get_Coordinates
			TP_TFT_GetX
				Delay_300us
				ADC1_Get_Sample
				ADC2_Get_Sample
				ADC3_Get_Sample
			TP_TFT_GetY
				Delay_300us
				ADC1_Get_Sample
				ADC2_Get_Sample
				ADC3_Get_Sample
		Process_TP_Press
			Get_Object
				IsInsideObject
		Process_TP_Down
			Get_Object
			DrawCircleButton
		Process_TP_Up
			DrawCircleButton
			Get_Object
