Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make similar structure items in same order #4

Open
richardlc68 opened this issue May 9, 2024 · 0 comments
Open

Make similar structure items in same order #4

richardlc68 opened this issue May 9, 2024 · 0 comments

Comments

@richardlc68
Copy link

Is your feature request related to a problem? Please describe.

The structures cy_network_static_ip_addr_t and cy_wcm_ip_setting_t are pretty much the same when used in different places(cy_nw_ip_address_t is also identical with cy_wcm_ip_address_t), but the items are not in the same order, does it have a particular reason to do so? this difference won't benefit from using direct mem-copy(such as memcpy() or casting), it makes the conversion unnecessarily complicated,

Describe the solution you'd like

This is what cy_network_static_ip_addr_t looks like:

typedef struct cy_network_static_ip_addr
{
    cy_nw_ip_address_t addr;    /**< The IP address for the network interface */
    cy_nw_ip_address_t netmask; /**< The netmask for the network interface */
    cy_nw_ip_address_t gateway; /**< The default gateway for network traffic */
} cy_network_static_ip_addr_t;

make the same order in file include\cy_wcm.h at line 489:

typedef struct
{
    cy_wcm_ip_address_t  ip_address;  /**< IP address.      */
    cy_wcm_ip_address_t  netmask;     /**< Netmask.         */   ----- swap this network with gateway
    cy_wcm_ip_address_t  gateway;     /**< Gateway address. */
} cy_wcm_ip_setting_t;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant