[X9D] Lighter grey on main views, USB icon working, power driver
This commit is contained in:
+2
-2
@@ -1,2 +1,2 @@
|
||||
102,8,
|
||||
0x1d,0xe3,0xe3,0x1c,0x1c,0xdd,0xdd,0x3e,0xea,0x23,0x6b,0xb6,0xa1,0x9f,0xbf,0xc0,0xf9,0xef,0xff,0xe8,0xa1,0x9f,0xbf,0xc0,0xea,0x23,0x6b,0xb6,0x1c,0xdd,0xdd,0x3e,0x1d,0xe3,0xe3,0x1c,0x38,0xff,0xff,0x38,0x7c,0xbb,0xbb,0x7c,0xfe,0x7d,0x7d,0xfe,0xfe,0xff,0xff,0xfe,0x00,0xff,0xff,0x00,0x50,0xff,0xff,0x50,0x20,0xff,0xff,0x20,0x50,0xff,0xff,0x50,0x38,0xff,0xff,0x38,0x7c,0xbb,0xbb,0x7c,0xfe,0x7d,0x7d,0xfe,0xfe,0xff,0xff,0xfe,0x00,0xff,0xff,0x00,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x38,0xff,0xff,0x38,0x7c,0xbb,0xbb,0x7c,0xfe,0x7d,0x7d,0xfe,0xfe,0xff,0xff,0xfe,0x00,0xff,0xff,0x00,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x38,0xff,0xff,0x38,0x7c,0xbb,0xbb,0x7c,0xfe,0x7d,0x7d,0xfe,0xfe,0xff,0xff,0xfe,0x00,0xff,0xff,0x00,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xc1,0x41,0x41,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xfd,0xfb,0x7b,0x79,0xfb,0xc7,0x47,0x43,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xe3,0xff,0x77,0x63,0xdd,0xff,0x63,0x41,0xdd,0xff,0x41,0x41,0xdd,0xff,0x63,0x41,0xe3,0xff,0x77,0x63,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xfd,0xff,0x43,0x41,0xff,0xff,0x7d,0x7d,0xff,0xff,0x73,0x73,0xff,0xff,0x7d,0x7d,0xdd,0xff,0x63,0x41,0xff,0xff,0x5f,0x5f,0xff,0xff,0x59,0x59,0xdd,0xff,0x63,0x41,0xff,0xff,0x79,0x79,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0x79,0xdd,0xff,0x63,0x41,0xff,0xff,0x59,0x59,0xff,0xff,0x5f,0x5f,0xf5,0xff,0x5b,0x51,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xd7,0xff,0x6d,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0x63,0x63,0xff,0xff,0x63,0x63,0xff,0xff,0x77,0x77,0xff,0xff,0x73,0x73,0xff,0xff,0x65,0x65,0xfd,0xff,0x57,0x55,0xff,0xff,0x77,0x77,0xff,0xff,0x63,0x63,0xeb,0xff,0x77,0x63,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x51,0x51,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,
|
||||
102,8,
|
||||
0xff,0xff,0x00,0x00,0xff,0xff,0x1c,0x1c,0x6b,0xff,0xb6,0x22,0xbf,0xff,0xc0,0x80,0xff,0xff,0xe8,0xe8,0xbf,0xff,0xc0,0x80,0x6b,0xff,0xb6,0x22,0xff,0xff,0x1c,0x1c,0xff,0xff,0x00,0x00,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x20,0x20,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xc1,0x41,0x41,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xfd,0xfb,0x7b,0x79,0xfb,0xc7,0x47,0x43,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xe3,0xff,0x77,0x63,0xdd,0xff,0x63,0x41,0xdd,0xff,0x41,0x41,0xdd,0xff,0x63,0x41,0xe3,0xff,0x77,0x63,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xfd,0xff,0x43,0x41,0xff,0xff,0x7d,0x7d,0xff,0xff,0x73,0x73,0xff,0xff,0x7d,0x7d,0xdd,0xff,0x63,0x41,0xff,0xff,0x5f,0x5f,0xff,0xff,0x59,0x59,0xdd,0xff,0x63,0x41,0xff,0xff,0x79,0x79,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0x79,0xdd,0xff,0x63,0x41,0xff,0xff,0x59,0x59,0xff,0xff,0x5f,0x5f,0xf5,0xff,0x5b,0x51,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xd7,0xff,0x6d,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0x63,0x63,0xff,0xff,0x63,0x63,0xff,0xff,0x77,0x77,0xff,0xff,0x73,0x73,0xff,0xff,0x65,0x65,0xfd,0xff,0x57,0x55,0xff,0xff,0x77,0x77,0xff,0xff,0x63,0x63,0xeb,0xff,0x77,0x63,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x51,0x51,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 3.1 KiB |
@@ -129,7 +129,7 @@
|
||||
|
||||
#if defined(PCBX9D)
|
||||
#define GREY(x) ((x) * 0x1000)
|
||||
#define GREY_DEFAULT GREY(8)
|
||||
#define GREY_DEFAULT GREY(11)
|
||||
#define GREY_MASK(x) ((x) & 0xF000)
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ void displayTopBar()
|
||||
x -= 12;
|
||||
}
|
||||
|
||||
if (1) {
|
||||
if (usbPlugged()) {
|
||||
LCD_NOTIF_ICON(x, ICON_USB);
|
||||
x -= 12;
|
||||
}
|
||||
|
||||
+1
-1
@@ -3493,7 +3493,7 @@ void menuModelCustomFunctions(uint8_t event)
|
||||
#if defined(GVARS)
|
||||
else if (CFN_FUNC(sd) >= FUNC_ADJUST_GV1
|
||||
#if defined(DEBUG)
|
||||
&& CFN_FUNC(sd) <= FUNC_ADJUST_GV5
|
||||
&& CFN_FUNC(sd) <= FUNC_ADJUST_GVLAST
|
||||
#endif
|
||||
) {
|
||||
switch (CFN_GVAR_MODE(sd)) {
|
||||
|
||||
@@ -43,6 +43,7 @@ extern "C" {
|
||||
uint8_t temperature = 0; // Raw temp reading
|
||||
uint8_t maxTemperature = 0 ; // Raw temp reading
|
||||
volatile uint32_t Tenms ; // TODO to remove everywhere / use a #define
|
||||
uint8_t usb_connected = 0;
|
||||
|
||||
#define PIN_MODE_MASK 0x0003
|
||||
#define PIN_INPUT 0x0000
|
||||
@@ -106,6 +107,11 @@ void configure_pins( uint32_t pins, uint16_t config )
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t usbPlugged(void)
|
||||
{
|
||||
return usb_connected;
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
void debugPutc(const char c)
|
||||
{
|
||||
|
||||
@@ -80,6 +80,7 @@ uint8_t getTemperature();
|
||||
|
||||
extern uint16_t sessionTimer;
|
||||
|
||||
uint8_t usbPlugged(void);
|
||||
#define BOOTLOADER_REQUEST() (0/*usbPlugged()*/)
|
||||
|
||||
#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/)
|
||||
|
||||
@@ -156,6 +156,8 @@
|
||||
#define RCC_AHB1Periph_GPIOPWR RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD
|
||||
#define GPIOPWRLED GPIOC
|
||||
#define GPIOPWR GPIOD
|
||||
#define GPIOTRNDET GPIOA
|
||||
#define PIN_TRNDET GPIO_Pin_8
|
||||
|
||||
// Trainer Port
|
||||
#define PIN_TR_PPM_IN GPIO_Pin_8 //PC.08
|
||||
@@ -255,6 +257,11 @@
|
||||
#define I2C_EE_SDA GPIO_Pin_0 //PE0
|
||||
#define I2C_EE_WP GPIO_Pin_9 //PB9
|
||||
#else
|
||||
#define RCC_APBPeriph_I2C_EE RCC_APB1Periph_I2C1
|
||||
#define I2C_EE I2C1
|
||||
#define GPIO_AF_I2C_EE GPIO_AF_I2C1
|
||||
#define GPIO_PinSource_I2C_EE_SCL GPIO_PinSource6
|
||||
#define GPIO_PinSource_I2C_EE_SDA GPIO_PinSource7
|
||||
#define I2C_EE_GPIO GPIOB
|
||||
#define I2C_EE_WP_GPIO GPIOB
|
||||
#define I2C_EE_GPIO_CLK RCC_AHB1Periph_GPIOB
|
||||
|
||||
@@ -48,6 +48,12 @@ uint32_t pwrCheck()
|
||||
#else
|
||||
if (GPIO_ReadInputDataBit(GPIOPWR, PIN_PWR_STATUS) == Bit_RESET)
|
||||
return e_power_on;
|
||||
#if !defined(REV3)
|
||||
else if (GPIO_ReadInputDataBit(GPIOTRNDET, PIN_TRNDET) == Bit_RESET)
|
||||
return e_power_trainer;
|
||||
#endif
|
||||
else if (usbPlugged())
|
||||
return e_power_usb;
|
||||
else
|
||||
return e_power_off;
|
||||
#endif
|
||||
|
||||
+4
-2
@@ -28,6 +28,8 @@
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "usbd_usr.h"
|
||||
|
||||
extern uint8_t usb_connected;
|
||||
|
||||
/* Points to the DEVICE_PROP structure of current device */
|
||||
/* The purpose of this register is to speed up the execution */
|
||||
|
||||
@@ -102,7 +104,7 @@ void USBD_USR_DeviceResumed(void)
|
||||
*/
|
||||
void USBD_USR_DeviceConnected (void)
|
||||
{
|
||||
|
||||
usb_connected = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +116,7 @@ void USBD_USR_DeviceConnected (void)
|
||||
*/
|
||||
void USBD_USR_DeviceDisconnected (void)
|
||||
{
|
||||
|
||||
usb_connected = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user