Add isSlim() macro

This commit is contained in:
calamari 2022-09-25 10:37:18 -07:00
parent 98fea4f2ec
commit 5c331e5fa0
3 changed files with 8 additions and 2 deletions

View file

@ -45,6 +45,12 @@ void hw_detect(void);
#define isSH4() (!isSH3())
#endif
#if defined(FX9860G)
#define isSlim() (gint[HWCALC] == HWCALC_FX9860G_SLIM)
#else
#define isSlim() 0
#endif
#ifdef FXCG50
#define isSH3() 0
#define isSH4() 1

View file

@ -148,7 +148,7 @@ void iokbd_scan(uint8_t *scan)
for(int i = 0; i < 12; i++) scan[i] = iokbd_row(i);
/* Translate fx-9860G Slim scancodes to standard scancodes */
if (gint[HWCALC] == HWCALC_FX9860G_SLIM)
if (isSlim())
{
uint8_t slim_scan[12];
for (uint i = 0; i < 10; i++)

View file

@ -168,7 +168,7 @@ void t6k11_backlight(int setting)
TODO: Document the PFC to remove these addresses */
if(isSH3())
{
if (gint[HWCALC] == HWCALC_FX9860G_SLIM)
if (isSlim())
{
port = (void *)0xa4000126;
mask = 0x20;