wiringPi : warn message add.
Change-Id: I7c53a5221a3d26340a0b1d5df19519bf99ecd2b1
This commit is contained in:
committed by
Yang Deokgyu
parent
ff2c1ddede
commit
413ab3f5d2
@@ -129,7 +129,7 @@ int msg (int type, const char *message, ...)
|
|||||||
vsnprintf (buffer, 1023, message, argp);
|
vsnprintf (buffer, 1023, message, argp);
|
||||||
va_end (argp) ;
|
va_end (argp) ;
|
||||||
|
|
||||||
fprintf (stderr, "%s:%s", type == MSG_WARN ? "warn" : "err", buffer) ;
|
fprintf (stderr, "%s : %s", type == MSG_WARN ? "warn" : "err", buffer) ;
|
||||||
|
|
||||||
if (type != MSG_WARN)
|
if (type != MSG_WARN)
|
||||||
exit (EXIT_FAILURE) ;
|
exit (EXIT_FAILURE) ;
|
||||||
@@ -137,25 +137,29 @@ int msg (int type, const char *message, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
static void warn_msg(const *func)
|
||||||
|
{
|
||||||
|
msg(MSG_WARN, "(%s) : This function is not supported by ODROID Board.\n", func);
|
||||||
|
}
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
//
|
//
|
||||||
// Unsupport Function list on ODROIDs
|
// Unsupport Function list on ODROIDs
|
||||||
//
|
//
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
static void piGpioLayoutOops (const char *why) { return; }
|
static void piGpioLayoutOops (const char *why) { warn_msg(__func__); return; }
|
||||||
void setPadDrive (int group, int value) { return; }
|
void setPadDrive (int group, int value) { warn_msg(__func__); return; }
|
||||||
void pwmSetMode (int mode) { return; }
|
void pwmSetMode (int mode) { warn_msg(__func__); return; }
|
||||||
void pwmSetRange (unsigned int range) { return; }
|
void pwmSetRange (unsigned int range) { warn_msg(__func__); return; }
|
||||||
void pwmSetClock (int divisor) { return; }
|
void pwmSetClock (int divisor) { warn_msg(__func__); return; }
|
||||||
void gpioClockSet (int pin, int freq) { return; }
|
void gpioClockSet (int pin, int freq) { warn_msg(__func__); return; }
|
||||||
|
|
||||||
/* core unsupport function */
|
/* core unsupport function */
|
||||||
void pinModeAlt (int pin, int mode) { return; }
|
void pinModeAlt (int pin, int mode) { warn_msg(__func__); return; }
|
||||||
void pwmWrite (int pin, int value) { return; }
|
void pwmWrite (int pin, int value) { warn_msg(__func__); return; }
|
||||||
void analogWrite (int pin, int value) { return; }
|
void analogWrite (int pin, int value) { warn_msg(__func__); return; }
|
||||||
void pwmToneWrite (int pin, int freq) { return; }
|
void pwmToneWrite (int pin, int freq) { warn_msg(__func__); return; }
|
||||||
void digitalWriteByte2 (const int value) { return; }
|
void digitalWriteByte2 (const int value) { warn_msg(__func__); return; }
|
||||||
unsigned int digitalReadByte2 (void) { return -1; }
|
unsigned int digitalReadByte2 (void) { warn_msg(__func__); return -1; }
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
// Extend wiringPi with other pin-based devices and keep track of
|
// Extend wiringPi with other pin-based devices and keep track of
|
||||||
// them in this structure
|
// them in this structure
|
||||||
|
|||||||
Reference in New Issue
Block a user