Changeset 601:b76ca6cf82fc
- Timestamp:
- 06/11/08 11:23:03 (7 months ago)
- Author:
- Maxime Petazzoni <maxime.petazzoni@…>
- Branch:
- default
- Message:
-
Add the "end" and "nop" commands, doing nothing. Also fix
a bug in nx_rcmd_play() introduced by the API change of streq().
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r598
|
r601
|
|
| 24 | 24 | static rcmd_err_t nx_rcmd_exec(char *line); |
| 25 | 25 | static rcmd_err_t nx_rcmd_wait(char *line); |
| | 26 | static rcmd_err_t nx_rcmd_nop(char *line); |
| 26 | 27 | |
| 27 | 28 | static rcmd_command_def rcmd_commands[] = { |
| … |
… |
|
| 32 | 33 | { "exec", 2, nx_rcmd_exec }, |
| 33 | 34 | { "wait", 2, nx_rcmd_wait }, |
| | 35 | { "end", 1, nx_rcmd_nop }, |
| | 36 | { "nop", 1, nx_rcmd_nop }, |
| 34 | 37 | { NULL, 0, NULL }, |
| 35 | 38 | }; |
| … |
… |
|
| 184 | 187 | } |
| 185 | 188 | |
| 186 | | if (ntokens == 4 && streq(line + indices[3], "sync") == 0) { |
| | 189 | if (ntokens == 4 && streq(line + indices[3], "sync")) { |
| 187 | 190 | nx_sound_freq(freq, duration); |
| 188 | 191 | } else { |
| … |
… |
|
| 228 | 231 | |
| 229 | 232 | nx_systick_wait_ms(wait); |
| | 233 | return RCMD_ERR_NO_ERROR; |
| | 234 | } |
| | 235 | |
| | 236 | static rcmd_err_t nx_rcmd_nop(char *line) { |
| | 237 | /* No-op. */ |
| | 238 | char c; |
| | 239 | c = line[0]; |
| | 240 | |
| 230 | 241 | return RCMD_ERR_NO_ERROR; |
| 231 | 242 | } |