[riot-notifications] [RIOT-OS/RIOT] CC1312R Sub-GHz netdev driver (Proof of Concept) (#13295)

Jean Pierre Dudey notifications at github.com
Tue May 5 02:15:04 CEST 2020


@jeandudey commented on this pull request.



> +    uint16_t command_no; /**< The command ID number */
+    uint16_t status; /**< An integer telling the status of the command. */
+    void *next_op; /**< Pointer to the next operation to run */

Using `rfc_op_t` can be fine for this, it includes the common fields on all commands:

```
/**
 * @brief   General radio operation.
 */
typedef struct {
    uint16_t command_no; /**< The command ID number */
    uint16_t status; /**< An integer telling the status of the command. */
    void *next_op; /**< Pointer to the next operation to run */
    rfc_ratmr_t start_time; /**< Absolute or relative start time */
    rfc_trigger_t start_trigger; /**< Identification of the trigger that
                                         starts the operation */
    rfc_cond_t condition; /**< Condition for running next command */
} rfc_op_t;
```

This way code doesn't get repeated. My doubt was that the compiler could align the fields differently, that's how TI choose to do it on their SDK (repeating all the fields on each struct) probably to workaround layout/alignment bugs on their compiler, I'll change it and test.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/13295#discussion_r419800762
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200504/cae41319/attachment.htm>


More information about the notifications mailing list