1
0
Fork 0

Helix-serial.c configuration improvement (#4370)

The new simple API can be selected.

Previous version, can select two way.
  * use old API (compatible with let's split serial.c)
  * use new API (multi-type transaction)

This version, can select three way.
  * use old API (compatible with let's split serial.c)
  * use new API (single-type transaction)
  * use new API (multi-type transaction)

There is no change in the code generated by this change.
This commit is contained in:
Takeshi ISHII 2018-11-07 05:02:30 +09:00 committed by Drashna Jaelre
parent 8f5ac39fb9
commit a91f439aec
2 changed files with 23 additions and 18 deletions

View file

@ -71,8 +71,8 @@
#endif
//////////////// for backward compatibility ////////////////////////////////
#ifndef SERIAL_USE_MULTI_TRANSACTION
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
/* --- USE OLD API (compatible with let's split serial.c) */
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
#endif
@ -112,7 +112,7 @@ int serial_update_buffers()
return result;
}
#endif // end of Simple API (OLD API, compatible with let's split serial.c)
#endif // end of OLD API (compatible with let's split serial.c)
////////////////////////////////////////////////////////////////////////////
#define ALWAYS_INLINE __attribute__((always_inline))