Implemented PINOUT.TXT file
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
X(NOT_APPLICABLE, NULL) \
|
||||
X(HW_TIMEOUT, NULL) \
|
||||
X(NO_SUCH_UNIT, NULL) \
|
||||
X(OVERRUN, NULL) /* used in bulk transfer */ \
|
||||
X(PROTOCOL_BREACH, NULL) /* eating with the wrong spoon */ \
|
||||
X(BAD_UNIT_TYPE, NULL) \
|
||||
X(NOT_IMPLEMENTED, NULL) \
|
||||
|
||||
@@ -91,3 +91,10 @@ void iw_entry(IniWriter *iw, const char *key, const char *format, ...)
|
||||
IW_VPRINTF();
|
||||
iw_newline(iw); // one newline after entry
|
||||
}
|
||||
|
||||
uint32_t iw_measure_total(void (*handler)(IniWriter *))
|
||||
{
|
||||
IniWriter iw = iw_init(NULL, 0xFFFFFFFF, 1);
|
||||
handler(&iw);
|
||||
return 0xFFFFFFFF - iw.skip;
|
||||
}
|
||||
|
||||
@@ -97,4 +97,12 @@ __attribute__((format(printf,2,3)));
|
||||
void iw_entry(IniWriter *iw, const char *key, const char *format, ...)
|
||||
__attribute__((format(printf,3,4)));
|
||||
|
||||
/**
|
||||
* Measure total ini writer length using a dummy write
|
||||
*
|
||||
* @param handler - function that normally writes to the writer
|
||||
* @return byte count
|
||||
*/
|
||||
uint32_t iw_measure_total(void (*handler)(IniWriter *));
|
||||
|
||||
#endif //INIWRITER_H
|
||||
|
||||
Reference in New Issue
Block a user