wrap_command macro
This commit is contained in:
parent
18f0be072a
commit
1eb59d986a
13 changed files with 162 additions and 107 deletions
|
@ -99,7 +99,7 @@ typedef uint8_t BinaryOperation;
|
|||
#endif // __cplusplus
|
||||
|
||||
/**
|
||||
* The u16 command codes used for the [Command]s.
|
||||
* The u16 command codes used for the [`crate::Command`]s.
|
||||
*/
|
||||
enum CommandCode
|
||||
#ifdef __cplusplus
|
||||
|
@ -560,7 +560,7 @@ typedef struct ValueGrid_u8 Cp437Grid;
|
|||
typedef union CommandUnion {
|
||||
uint8_t *null;
|
||||
struct BitmapCommand */*notnull*/ bitmap;
|
||||
struct BitVecCommand */*notnull*/ bitvec;
|
||||
struct BitVecCommand */*notnull*/ bit_vec;
|
||||
struct BrightnessGridCommand */*notnull*/ brightness_grid;
|
||||
struct CharGridCommand */*notnull*/ char_grid;
|
||||
struct Cp437GridCommand */*notnull*/ cp437_grid;
|
||||
|
@ -1432,20 +1432,6 @@ void sp_cmd_bitvec_set_operation(struct BitVecCommand */*notnull*/ instance,
|
|||
*/
|
||||
struct Packet *sp_cmd_bitvec_try_into_packet(struct BitVecCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`GlobalBrightnessCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_global module.
|
||||
*/
|
||||
struct GlobalBrightnessCommand */*notnull*/ sp_cmd_brightness_global_clone(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`GlobalBrightnessCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_global module.
|
||||
*/
|
||||
void sp_cmd_brightness_global_free(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Gets the value of field `brightness` of the [`servicepoint::GlobalBrightnessCommand`].
|
||||
*
|
||||
|
@ -1477,20 +1463,6 @@ struct GlobalBrightnessCommand */*notnull*/ sp_cmd_brightness_global_new(Brightn
|
|||
void sp_cmd_brightness_global_set_brightness(struct GlobalBrightnessCommand */*notnull*/ instance,
|
||||
Brightness value);
|
||||
|
||||
/**
|
||||
*Clones a [`BrightnessGridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_grid module.
|
||||
*/
|
||||
struct BrightnessGridCommand */*notnull*/ sp_cmd_brightness_grid_clone(struct BrightnessGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`BrightnessGridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_grid module.
|
||||
*/
|
||||
void sp_cmd_brightness_grid_free(struct BrightnessGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Moves the provided [BrightnessGrid] into a new [BrightnessGridCommand],
|
||||
* leaving other fields as their default values.
|
||||
|
@ -1559,18 +1531,18 @@ void sp_cmd_brightness_grid_set_origin(struct BrightnessGridCommand */*notnull*/
|
|||
size_t origin_y);
|
||||
|
||||
/**
|
||||
*Clones a [`CharGridCommand`] instance.
|
||||
*Clones a [`BrightnessGridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_char_grid module.
|
||||
* This function is part of the sp_cmd_brightnessgrid module.
|
||||
*/
|
||||
struct CharGridCommand */*notnull*/ sp_cmd_char_grid_clone(struct CharGridCommand */*notnull*/ instance);
|
||||
struct BrightnessGridCommand */*notnull*/ sp_cmd_brightnessgrid_clone(struct BrightnessGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`CharGridCommand`] instance.
|
||||
*Deallocates a [`BrightnessGridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_char_grid module.
|
||||
* This function is part of the sp_cmd_brightnessgrid module.
|
||||
*/
|
||||
void sp_cmd_char_grid_free(struct CharGridCommand */*notnull*/ instance);
|
||||
void sp_cmd_brightnessgrid_free(struct BrightnessGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Moves the provided [CharGrid] into a new [CharGridCommand],
|
||||
|
@ -1639,6 +1611,27 @@ void sp_cmd_char_grid_set_origin(struct CharGridCommand */*notnull*/ command,
|
|||
*/
|
||||
struct Packet *sp_cmd_char_grid_try_into_packet(struct CharGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`CharGridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_chargrid module.
|
||||
*/
|
||||
struct CharGridCommand */*notnull*/ sp_cmd_chargrid_clone(struct CharGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`CharGridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_chargrid module.
|
||||
*/
|
||||
void sp_cmd_chargrid_free(struct CharGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Clones a [`ClearCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_clear module.
|
||||
*/
|
||||
struct ClearCommand */*notnull*/ sp_cmd_clear_clone(struct ClearCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`ClearCommand`] instance.
|
||||
*
|
||||
|
@ -1657,20 +1650,6 @@ void sp_cmd_clear_free(struct ClearCommand */*notnull*/ instance);
|
|||
*/
|
||||
struct ClearCommand */*notnull*/ sp_cmd_clear_new(void);
|
||||
|
||||
/**
|
||||
*Clones a [`Cp437GridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437_grid module.
|
||||
*/
|
||||
struct Cp437GridCommand */*notnull*/ sp_cmd_cp437_grid_clone(struct Cp437GridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`Cp437GridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437_grid module.
|
||||
*/
|
||||
void sp_cmd_cp437_grid_free(struct Cp437GridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Moves the provided [Cp437Grid] into a new [Cp437GridCommand],
|
||||
* leaving other fields as their default values.
|
||||
|
@ -1738,21 +1717,42 @@ void sp_cmd_cp437_grid_set_origin(struct Cp437GridCommand */*notnull*/ command,
|
|||
*/
|
||||
struct Packet *sp_cmd_cp437_grid_try_into_packet(struct Cp437GridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`Cp437GridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437grid module.
|
||||
*/
|
||||
struct Cp437GridCommand */*notnull*/ sp_cmd_cp437grid_clone(struct Cp437GridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`Cp437GridCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437grid module.
|
||||
*/
|
||||
void sp_cmd_cp437grid_free(struct Cp437GridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Clones a [`FadeOutCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_fadeout module.
|
||||
*/
|
||||
struct FadeOutCommand */*notnull*/ sp_cmd_fadeout_clone(struct FadeOutCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`FadeOutCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_fade_out module.
|
||||
* This function is part of the sp_cmd_fadeout module.
|
||||
*/
|
||||
void sp_cmd_fade_out_free(struct FadeOutCommand */*notnull*/ instance);
|
||||
void sp_cmd_fadeout_free(struct FadeOutCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* A yet-to-be-tested command.
|
||||
*
|
||||
* Returns: a new [`FadeOutCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_fade_out module.
|
||||
* This function is part of the sp_cmd_fadeout module.
|
||||
*/
|
||||
struct FadeOutCommand */*notnull*/ sp_cmd_fade_out_new(void);
|
||||
struct FadeOutCommand */*notnull*/ sp_cmd_fadeout_new(void);
|
||||
|
||||
/**
|
||||
* Clones an [SPCommand] instance.
|
||||
|
@ -1800,12 +1800,33 @@ struct Packet *sp_cmd_generic_into_packet(struct Command command);
|
|||
*/
|
||||
struct Command sp_cmd_generic_try_from_packet(struct Packet */*notnull*/ packet);
|
||||
|
||||
/**
|
||||
*Clones a [`GlobalBrightnessCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_globalbrightness module.
|
||||
*/
|
||||
struct GlobalBrightnessCommand */*notnull*/ sp_cmd_globalbrightness_clone(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`GlobalBrightnessCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_globalbrightness module.
|
||||
*/
|
||||
void sp_cmd_globalbrightness_free(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Clones a [`HardResetCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_hardreset module.
|
||||
*/
|
||||
struct HardResetCommand */*notnull*/ sp_cmd_hardreset_clone(struct HardResetCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
*Deallocates a [`HardResetCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_hard_reset module.
|
||||
* This function is part of the sp_cmd_hardreset module.
|
||||
*/
|
||||
void sp_cmd_hard_reset_free(struct HardResetCommand */*notnull*/ instance);
|
||||
void sp_cmd_hardreset_free(struct HardResetCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Kills the udp daemon on the display, which usually results in a restart.
|
||||
|
@ -1814,9 +1835,9 @@ void sp_cmd_hard_reset_free(struct HardResetCommand */*notnull*/ instance);
|
|||
*
|
||||
* Returns: a new [`HardResetCommand`] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_hard_reset module.
|
||||
* This function is part of the sp_cmd_hardreset module.
|
||||
*/
|
||||
struct HardResetCommand */*notnull*/ sp_cmd_hard_reset_new(void);
|
||||
struct HardResetCommand */*notnull*/ sp_cmd_hardreset_new(void);
|
||||
|
||||
/**
|
||||
*Clones a [`Cp437Grid`] instance.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue