summaryrefslogtreecommitdiff
path: root/src/svf
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-10 18:51:32 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:51:45 -0800
commit3f9fd4e2a6ab7b3ce3819c385c34cf6f4630763c (patch)
tree5ebab161e2d2c9bc1ad56503783eae1812ee4264 /src/svf
parent1ae4d93c3c90f176f6b94579ba3fabe1e17d715e (diff)
downloadopenocd+libswd-3f9fd4e2a6ab7b3ce3819c385c34cf6f4630763c.tar.gz
openocd+libswd-3f9fd4e2a6ab7b3ce3819c385c34cf6f4630763c.tar.bz2
openocd+libswd-3f9fd4e2a6ab7b3ce3819c385c34cf6f4630763c.tar.xz
openocd+libswd-3f9fd4e2a6ab7b3ce3819c385c34cf6f4630763c.zip
add COMMAND_HANDLER and COMMAND_HELPER macros
The COMMAND_HANDLER and COMMAND_HELPER macros allow commands to be defined in a manner that decouples them from the exact order and type of their parameters. Once converted, incremental changes to the command handler type can be addressed in incremental patches that do not need to touch the entire tree. These macros' implementation, __COMMAND_HANDLER, is used to define the new command_handler_t type, and additional patches will use it to derive new macros to define extended command types (e.g. flash, nand, pld). The CALL_COMMAND_HANDLER provides a means of calling helpers or nested handlers from withing a command handler. This patch uses C99 varadic macro expansion. Please report compilers that cannot handle this code.
Diffstat (limited to 'src/svf')
0 files changed, 0 insertions, 0 deletions