mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 22:35:12 +03:00
[Horus] Cosmetics
This commit is contained in:
parent
f926b85611
commit
fe3efb9483
6 changed files with 92 additions and 102 deletions
|
@ -240,31 +240,31 @@ const uint8_t * const LBM_MAINVIEWS_ICONS[] = {
|
|||
* Model selection screen bitmaps
|
||||
*/
|
||||
|
||||
const uint8_t LBM_LIBRARY_ICON[] __DMA = {
|
||||
const uint8_t LBM_LIBRARY_ICON[] = {
|
||||
#include "mask_library.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_LIBRARY_SLOT[] __DMA = {
|
||||
const uint8_t LBM_LIBRARY_SLOT[] = {
|
||||
#include "mask_library_slot.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_LIBRARY_CURSOR[] __DMA = {
|
||||
const uint8_t LBM_LIBRARY_CURSOR[] = {
|
||||
#include "mask_library_category_index.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SCORE0[] __DMA = {
|
||||
const uint8_t LBM_SCORE0[] = {
|
||||
#include "mask_library_score_0.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SCORE1[] __DMA = {
|
||||
const uint8_t LBM_SCORE1[] = {
|
||||
#include "mask_library_score_1.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_STAR0[] __DMA = {
|
||||
const uint8_t LBM_STAR0[] = {
|
||||
#include "mask_library_star_0.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_STAR1[] __DMA = {
|
||||
const uint8_t LBM_STAR1[] = {
|
||||
#include "mask_library_star_1.lbm"
|
||||
};
|
||||
|
||||
|
@ -272,15 +272,15 @@ const uint8_t LBM_STAR1[] __DMA = {
|
|||
* Calibration screen
|
||||
*/
|
||||
|
||||
const uint8_t LBM_HORUS[] __DMA = {
|
||||
const uint8_t LBM_HORUS[] = {
|
||||
#include "alpha_horus.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_STICK_BACKGROUND[] __DMA = {
|
||||
const uint8_t LBM_STICK_BACKGROUND[] = {
|
||||
#include "alpha_stick_background.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_STICK_POINTER[] __DMA = {
|
||||
const uint8_t LBM_STICK_POINTER[] = {
|
||||
#include "alpha_stick_pointer.lbm"
|
||||
};
|
||||
|
||||
|
@ -288,83 +288,83 @@ const uint8_t LBM_STICK_POINTER[] __DMA = {
|
|||
* Other
|
||||
*/
|
||||
|
||||
const uint8_t LBM_ASTERISK[] __DMA = {
|
||||
const uint8_t LBM_ASTERISK[] = {
|
||||
#include "alpha_asterisk.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_POINT[] __DMA = {
|
||||
const uint8_t LBM_POINT[] = {
|
||||
#include "mask_point.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_CURVE_POINT[] __DMA = {
|
||||
const uint8_t LBM_CURVE_POINT[] = {
|
||||
#include "mask_cvpoint.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_CURVE_POINT_CENTER[] __DMA = {
|
||||
const uint8_t LBM_CURVE_POINT_CENTER[] = {
|
||||
#include "mask_cvpoint_center.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_CURVE_COORD_SHADOW[] __DMA = {
|
||||
const uint8_t LBM_CURVE_COORD_SHADOW[] = {
|
||||
#include "mask_coord_shadow.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SHUTDOWN[] __DMA = {
|
||||
const uint8_t LBM_SHUTDOWN[] = {
|
||||
#include "alpha_shutdown.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SLEEP[] __DMA = {
|
||||
const uint8_t LBM_SLEEP[] __ALIGNED = {
|
||||
#include "bmp_sleep.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SHUTDOWN_CIRCLE[] __DMA = {
|
||||
const uint8_t LBM_SHUTDOWN_CIRCLE[] = {
|
||||
#include "mask_shutdown_circle.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SLIDER_BAR_LEFT[] __DMA = {
|
||||
const uint8_t LBM_SLIDER_BAR_LEFT[] __ALIGNED = {
|
||||
#include "bar_left.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SLIDER_BAR_RIGHT[] __DMA = {
|
||||
const uint8_t LBM_SLIDER_BAR_RIGHT[] __ALIGNED = {
|
||||
#include "bar_right.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SLIDER_POINT_OUT[] __DMA = {
|
||||
const uint8_t LBM_SLIDER_POINT_OUT[] __ALIGNED = {
|
||||
#include "point_out.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SLIDER_POINT_MID[] __DMA = {
|
||||
const uint8_t LBM_SLIDER_POINT_MID[] __ALIGNED = {
|
||||
#include "point_mid.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SLIDER_POINT_IN[] __DMA = {
|
||||
const uint8_t LBM_SLIDER_POINT_IN[] __ALIGNED = {
|
||||
#include "point_in.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_CARROUSSEL_LEFT[] __DMA = {
|
||||
const uint8_t LBM_CARROUSSEL_LEFT[] = {
|
||||
#include "mask_carroussel_left.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_CARROUSSEL_RIGHT[] __DMA = {
|
||||
const uint8_t LBM_CARROUSSEL_RIGHT[] = {
|
||||
#include "mask_carroussel_right.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_BUTTON_ON[] __DMA = {
|
||||
const uint8_t LBM_BUTTON_ON[] = {
|
||||
#include "alpha_button_on.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_BUTTON_OFF[] __DMA = {
|
||||
const uint8_t LBM_BUTTON_OFF[] = {
|
||||
#include "alpha_button_off.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SWIPE_CIRCLE[] __DMA = {
|
||||
const uint8_t LBM_SWIPE_CIRCLE[] = {
|
||||
#include "mask_swipe_circle.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SWIPE_LEFT[] __DMA = {
|
||||
const uint8_t LBM_SWIPE_LEFT[] = {
|
||||
#include "mask_swipe_left.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_SWIPE_RIGHT[] __DMA = {
|
||||
const uint8_t LBM_SWIPE_RIGHT[] = {
|
||||
#include "mask_swipe_right.lbm"
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "../../opentx.h"
|
||||
|
||||
const uint8_t LBM_SPLASH[] __DMA = {
|
||||
const uint8_t LBM_SPLASH[] __ALIGNED = {
|
||||
#include "bmp_splash.lbm"
|
||||
};
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
|
||||
#include "opentx.h"
|
||||
|
||||
const uint8_t LBM_TOPMENU_BMP_OPENTX[] __DMA = {
|
||||
const uint8_t LBM_TOPMENU_BMP_OPENTX[] __ALIGNED = {
|
||||
#include "bmp_topmenu_opentx.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_THEME_DARKBLUE[] __DMA = {
|
||||
const uint8_t LBM_THEME_DARKBLUE[] __ALIGNED = {
|
||||
#include "bmp_darkblue.lbm"
|
||||
};
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ const uint8_t LBM_TOPMENU_MASK_OPENTX[] = {
|
|||
#include "mask_topmenu_opentx.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_MAINVIEW_BACKGROUND[] = {
|
||||
const uint8_t LBM_MAINVIEW_BACKGROUND[] __ALIGNED = {
|
||||
#include "bmp_background.lbm"
|
||||
};
|
||||
|
||||
const uint8_t LBM_THEME_DEFAULT[] __DMA = {
|
||||
const uint8_t LBM_THEME_DEFAULT[] __ALIGNED = {
|
||||
#include "bmp_default.lbm"
|
||||
};
|
||||
|
||||
|
|
|
@ -203,14 +203,14 @@
|
|||
#define ROTARY_ENCODER_NAVIGATION
|
||||
#endif
|
||||
|
||||
#define __ALIGNED __attribute__((aligned(32)))
|
||||
|
||||
#if defined(SIMU)
|
||||
#define __DMA
|
||||
#elif defined(PCBSKY9X)
|
||||
#define __DMA __attribute__((aligned(32)))
|
||||
#elif defined(STM32F4)
|
||||
#define __DMA __attribute__((section(".ram"), aligned(32)))
|
||||
#else
|
||||
#define __DMA __attribute__((aligned(32)))
|
||||
#define __DMA __ALIGNED
|
||||
#endif
|
||||
|
||||
#if defined(SIMU) || defined(CPUARM) || GCC_VERSION < 472
|
||||
|
|
|
@ -66,7 +66,7 @@ int ff_del_syncobj (_SYNC_t mutex)
|
|||
/* Inidialize a Drive */
|
||||
|
||||
DSTATUS disk_initialize (
|
||||
BYTE drv /* Physical drive nmuber (0..) */
|
||||
BYTE drv /* Physical drive nmuber (0..) */
|
||||
)
|
||||
{
|
||||
DSTATUS stat = 0;
|
||||
|
@ -77,7 +77,7 @@ DSTATUS disk_initialize (
|
|||
stat |= STA_NOINIT;
|
||||
}
|
||||
|
||||
/*-------------------------- SD Init ----------------------------- */
|
||||
/*-------------------------- SD Init ----------------------------- */
|
||||
if (SD_Init() != SD_OK)
|
||||
{
|
||||
TRACE("SD_Init() failed");
|
||||
|
@ -87,13 +87,13 @@ DSTATUS disk_initialize (
|
|||
return(stat);
|
||||
}
|
||||
|
||||
|
||||
DWORD scratch[BLOCK_SIZE / 4] __DMA;
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* Return Disk Status */
|
||||
|
||||
DSTATUS disk_status (
|
||||
BYTE drv /* Physical drive nmuber (0..) */
|
||||
BYTE drv /* Physical drive nmuber (0..) */
|
||||
)
|
||||
{
|
||||
DSTATUS stat = 0;
|
||||
|
@ -113,10 +113,10 @@ uint32_t sdReadRetries = 0;
|
|||
/* Read Sector(s) */
|
||||
|
||||
DRESULT disk_read (
|
||||
BYTE drv, /* Physical drive nmuber (0..) */
|
||||
BYTE *buff, /* Data buffer to store read data */
|
||||
DWORD sector, /* Sector address (LBA) */
|
||||
UINT count /* Number of sectors to read (1..255) */
|
||||
BYTE drv, /* Physical drive nmuber (0..) */
|
||||
BYTE *buff, /* Data buffer to store read data */
|
||||
DWORD sector, /* Sector address (LBA) */
|
||||
UINT count /* Number of sectors to read (1..255) */
|
||||
)
|
||||
{
|
||||
DRESULT res = RES_OK;
|
||||
|
@ -129,12 +129,7 @@ DRESULT disk_read (
|
|||
return RES_NOTRDY;
|
||||
}
|
||||
|
||||
if ((DWORD)buff & 3) // DMA Alignment failure, do single up to aligned buffer
|
||||
{
|
||||
TRACE("DMA Alignment failure, align buffer");
|
||||
|
||||
DWORD scratch[BLOCK_SIZE / 4]; // Alignment assured, you'll need a sufficiently big stack
|
||||
|
||||
if ((DWORD)buff < 0x20000000 || (DWORD)buff >= 0x20030000 || ((DWORD)buff & 3)) {
|
||||
while(count--) {
|
||||
res = disk_read(drv, (BYTE *)scratch, sector++, 1);
|
||||
|
||||
|
@ -198,63 +193,58 @@ DRESULT disk_read (
|
|||
|
||||
#if _READONLY == 0
|
||||
DRESULT disk_write (
|
||||
BYTE drv, /* Physical drive nmuber (0..) */
|
||||
const BYTE *buff, /* Data to be written */
|
||||
DWORD sector, /* Sector address (LBA) */
|
||||
UINT count /* Number of sectors to write (1..255) */
|
||||
BYTE drv, /* Physical drive nmuber (0..) */
|
||||
const BYTE *buff, /* Data to be written */
|
||||
DWORD sector, /* Sector address (LBA) */
|
||||
UINT count /* Number of sectors to write (1..255) */
|
||||
)
|
||||
{
|
||||
SD_Error Status;
|
||||
DRESULT res = RES_OK;
|
||||
SD_Error Status;
|
||||
DRESULT res = RES_OK;
|
||||
|
||||
// TRACE("disk_write %d %p %10d %d", drv, buff, sector, count);
|
||||
// TRACE("disk_write %d %p %10d %d", drv, buff, sector, count);
|
||||
|
||||
if (SD_Detect() != SD_PRESENT)
|
||||
return(RES_NOTRDY);
|
||||
if (SD_Detect() != SD_PRESENT)
|
||||
return(RES_NOTRDY);
|
||||
|
||||
if ((DWORD)buff & 3) // DMA Alignment failure, do single up to aligned buffer
|
||||
{
|
||||
DWORD scratch[BLOCK_SIZE / 4]; // Alignment assured, you'll need a sufficiently big stack
|
||||
if ((DWORD)buff < 0x20000000 || (DWORD)buff >= 0x20030000 || ((DWORD)buff & 3)) {
|
||||
while(count--) {
|
||||
memcpy(scratch, buff, BLOCK_SIZE);
|
||||
|
||||
while(count--)
|
||||
{
|
||||
memcpy(scratch, buff, BLOCK_SIZE);
|
||||
res = disk_write(drv, (BYTE *)scratch, sector++, 1);
|
||||
|
||||
res = disk_write(drv, (BYTE *)scratch, sector++, 1);
|
||||
if (res != RES_OK)
|
||||
break;
|
||||
|
||||
if (res != RES_OK)
|
||||
break;
|
||||
buff += BLOCK_SIZE;
|
||||
}
|
||||
return(res);
|
||||
}
|
||||
|
||||
buff += BLOCK_SIZE;
|
||||
}
|
||||
if (count == 1) {
|
||||
Status = SD_WriteBlock((uint8_t *)buff, sector, BLOCK_SIZE); // 4GB Compliant
|
||||
}
|
||||
else {
|
||||
Status = SD_WriteMultiBlocks((uint8_t *)buff, sector, BLOCK_SIZE, count); // 4GB Compliant
|
||||
}
|
||||
|
||||
return(res);
|
||||
}
|
||||
if (Status == SD_OK)
|
||||
{
|
||||
SDTransferState State;
|
||||
|
||||
if (count == 1) {
|
||||
Status = SD_WriteBlock((uint8_t *)buff, sector, BLOCK_SIZE); // 4GB Compliant
|
||||
}
|
||||
else {
|
||||
Status = SD_WriteMultiBlocks((uint8_t *)buff, sector, BLOCK_SIZE, count); // 4GB Compliant
|
||||
}
|
||||
Status = SD_WaitWriteOperation(); // Check if the Transfer is finished
|
||||
|
||||
if (Status == SD_OK)
|
||||
{
|
||||
SDTransferState State;
|
||||
while((State = SD_GetStatus()) == SD_TRANSFER_BUSY); // BUSY, OK (DONE), ERROR (FAIL)
|
||||
|
||||
Status = SD_WaitWriteOperation(); // Check if the Transfer is finished
|
||||
if ((State == SD_TRANSFER_ERROR) || (Status != SD_OK))
|
||||
res = RES_ERROR;
|
||||
}
|
||||
else {
|
||||
res = RES_ERROR;
|
||||
}
|
||||
|
||||
while((State = SD_GetStatus()) == SD_TRANSFER_BUSY); // BUSY, OK (DONE), ERROR (FAIL)
|
||||
|
||||
if ((State == SD_TRANSFER_ERROR) || (Status != SD_OK))
|
||||
res = RES_ERROR;
|
||||
}
|
||||
else {
|
||||
res = RES_ERROR;
|
||||
}
|
||||
|
||||
// TRACE("result=%d", res);
|
||||
return res;
|
||||
// TRACE("result=%d", res);
|
||||
return res;
|
||||
}
|
||||
#endif /* _READONLY */
|
||||
|
||||
|
@ -265,9 +255,9 @@ DRESULT disk_write (
|
|||
/* Miscellaneous Functions */
|
||||
|
||||
DRESULT disk_ioctl (
|
||||
BYTE drv, /* Physical drive nmuber (0..) */
|
||||
BYTE ctrl, /* Control code */
|
||||
void *buff /* Buffer to send/receive control data */
|
||||
BYTE drv, /* Physical drive nmuber (0..) */
|
||||
BYTE ctrl, /* Control code */
|
||||
void *buff /* Buffer to send/receive control data */
|
||||
)
|
||||
{
|
||||
DRESULT res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue