Small improvement of using the compilation switches
This commit is contained in:
parent
e0c9e7d7c0
commit
600adcf406
|
@ -362,13 +362,7 @@ short chan_write(short channel, const uint8_t * buffer, short size) {
|
||||||
p_channel chan;
|
p_channel chan;
|
||||||
p_dev_chan cdev;
|
p_dev_chan cdev;
|
||||||
short res;
|
short res;
|
||||||
short test=0x1234;
|
log(LOG_TRACE,"chan_write(%d,%p,%x)", channel, buffer, (int)size);
|
||||||
log(LOG_TRACE,"chan_write(%d,%p,%x)", channel, buffer, test/*(int)size*/);
|
|
||||||
TRACE1("chan_write(%d)", (short)channel);
|
|
||||||
TRACE1("chan_write(,%p,)", buffer);
|
|
||||||
TRACE1("chan_write(,,%x)", (short)test/*(int)size*/);
|
|
||||||
|
|
||||||
// log_num(LOG_INFO, "chan_write: ", channel);
|
|
||||||
|
|
||||||
res = chan_get_records(channel, &chan, &cdev);
|
res = chan_get_records(channel, &chan, &cdev);
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
|
|
|
@ -89,7 +89,7 @@ extern void cdev_init_system();
|
||||||
* Inputs:
|
* Inputs:
|
||||||
* p_dev_chan = pointer to the description of the channel device
|
* p_dev_chan = pointer to the description of the channel device
|
||||||
*/
|
*/
|
||||||
extern short cdev_register(const p_dev_chan device);
|
extern short cdev_register(p_dev_chan device);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get a free channel
|
* Get a free channel
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "features.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
@ -818,7 +819,7 @@ short con_install() {
|
||||||
|
|
||||||
chan_open(CDEV_CONSOLE, 0, 0);
|
chan_open(CDEV_CONSOLE, 0, 0);
|
||||||
|
|
||||||
#if HAS_DUAL_SCREEN
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
chan_open(CDEV_EVID, 0, 0);
|
chan_open(CDEV_EVID, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "dev/kbd_mo.h"
|
#include "dev/kbd_mo.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
#if ( MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
||||||
short ind_state_color(short state) {
|
short ind_state_color(short state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case IND_ON:
|
case IND_ON:
|
||||||
|
@ -27,7 +27,7 @@ short ind_state_color(short state) {
|
||||||
#elif MODEL == MODEL_FOENIX_A2560X
|
#elif MODEL == MODEL_FOENIX_A2560X
|
||||||
return 0x06;
|
return 0x06;
|
||||||
#else
|
#else
|
||||||
return 0x03; // That is not possble because of the #if so why did Stefany mean ?
|
return 0x03;
|
||||||
#endif
|
#endif
|
||||||
case IND_ERROR:
|
case IND_ERROR:
|
||||||
/* Red for error */
|
/* Red for error */
|
||||||
|
@ -95,12 +95,15 @@ void ind_set_hdc(short state) {
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void ind_set_fdc(short state) {
|
void ind_set_fdc(short state) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ind_set_sdc(short state) {
|
void ind_set_sdc(short state) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ind_set_hdc(short state) {
|
void ind_set_hdc(short state) {
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -113,11 +116,10 @@ void ind_set_hdc(short state) {
|
||||||
*/
|
*/
|
||||||
void ind_set(short ind_number, short state) {
|
void ind_set(short ind_number, short state) {
|
||||||
switch (ind_number) {
|
switch (ind_number) {
|
||||||
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
|
||||||
case IND_POWER:
|
case IND_POWER:
|
||||||
ind_set_power(state);
|
ind_set_power(state);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case IND_FDC:
|
case IND_FDC:
|
||||||
ind_set_fdc(state);
|
ind_set_fdc(state);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Master file for the Yamaha sound chips
|
* Master file for the Yamaha sound chips
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
#include "sound_reg.h"
|
#include "sound_reg.h"
|
||||||
#include "snd/yamaha.h"
|
#include "snd/yamaha.h"
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@
|
||||||
*/
|
*/
|
||||||
void ym_write(enum e_ym_snd_dev dev, enum e_ym_position position, short port, unsigned char value) {
|
void ym_write(enum e_ym_snd_dev dev, enum e_ym_position position, short port, unsigned char value) {
|
||||||
switch (dev) {
|
switch (dev) {
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_OPN
|
||||||
case SND_OPN2:
|
case SND_OPN2:
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case EXTERNAL:
|
case EXTERNAL:
|
||||||
|
@ -31,7 +32,8 @@ void ym_write(enum e_ym_snd_dev dev, enum e_ym_position position, short port, un
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if HAS_OPM
|
||||||
case SND_OPM:
|
case SND_OPM:
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case EXTERNAL:
|
case EXTERNAL:
|
||||||
|
@ -63,22 +65,22 @@ void ym_init() {
|
||||||
short position;
|
short position;
|
||||||
short port;
|
short port;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_OPN
|
||||||
|
|
||||||
/* OPN */
|
/* OPN */
|
||||||
for (position = EXTERNAL; position <= INTERNAL; position++) {
|
for (position = EXTERNAL; position <= INTERNAL; position++) {
|
||||||
for (port = 0x40; port <= 0x4F; port++) {
|
for (port = 0x40; port <= 0x4F; port++) {
|
||||||
ym_write(SND_OPN2, position, port, 0x7F); /* Maximum attentuation */
|
ym_write(SND_OPN2, position, port, 0x7F); /* Maximum attentuation */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_OPM
|
||||||
/* OPM */
|
/* OPM */
|
||||||
for (position = EXTERNAL; position <= INTERNAL; position++) {
|
for (position = EXTERNAL; position <= INTERNAL; position++) {
|
||||||
for (port = 0x60; port <= 0x6F; port++) {
|
for (port = 0x60; port <= 0x6F; port++) {
|
||||||
ym_write(SND_OPM, position, port, 0x7F); /* Maximum attentuation */
|
ym_write(SND_OPM, position, port, 0x7F); /* Maximum attentuation */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* OPL3 */
|
/* OPL3 */
|
||||||
|
|
Loading…
Reference in a new issue