Skip to content

Commit 6cbc9f8

Browse files
committed
update *_config_t to be compat with *_attr_t
1 parent d3aed8c commit 6cbc9f8

30 files changed

Lines changed: 70 additions & 135 deletions

include/mcu/adc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ typedef struct MCU_PACK {
2121
} adc_event_t;
2222

2323
typedef struct MCU_PACK {
24-
u32 port;
2524
adc_attr_t attr; // default attributes
25+
u32 port;
2626
u32 reference_mv;
2727
} adc_config_t;
2828

include/mcu/crc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ extern "C" {
1111
#endif
1212

1313
typedef struct MCU_PACK {
14-
u32 port;
1514
crc_attr_t attr; // default attributes
15+
u32 port;
1616
} crc_config_t;
1717

1818
typedef struct MCU_PACK {

include/mcu/crypt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ extern "C" {
1111
#endif
1212

1313
typedef struct {
14-
u32 port;
1514
crypt_attr_t attr;
15+
u32 port;
1616
} crypt_config_t;
1717

1818
#define MCU_CRYPT_IOCTL_REQUEST_DECLARATION(driver_name) \

include/mcu/dac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ typedef struct MCU_PACK {
2121
} dac_event_t;
2222

2323
typedef struct MCU_PACK {
24-
u32 port;
2524
dac_attr_t attr; // default attributes
25+
u32 port;
2626
u32 reference_mv;
2727
} dac_config_t;
2828

include/mcu/eint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ typedef struct MCU_PACK {
2424
} eint_event_t;
2525

2626
typedef struct MCU_PACK {
27-
u32 port;
2827
eint_attr_t attr; // default attributes
28+
u32 port;
2929
} eint_config_t;
3030

3131
int mcu_eint_open(const devfs_handle_t *handle) MCU_ROOT_CODE;

include/mcu/emc.h

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,34 @@
99
#ifndef _MCU_EMC_H_
1010
#define _MCU_EMC_H_
1111

12-
1312
#include "sos/dev/emc.h"
1413
#include "sos/fs/devfs.h"
1514

1615
typedef struct MCU_PACK {
17-
u32 value;
16+
u32 value;
1817
} emc_event_data_t;
1918

2019
typedef struct MCU_PACK {
21-
emc_attr_t attr; //default attributes
22-
u32 base_address;
23-
u32 size;
24-
u32 freq;
25-
u16 data_bus_width;
26-
u16 resd;
20+
emc_attr_t attr; // default attributes
21+
u32 base_address;
22+
u32 size;
23+
u32 freq;
24+
u16 data_bus_width;
25+
u16 resd;
2726
} emc_config_t;
2827

2928
#ifdef __cplusplus
3029
extern "C" {
3130
#endif
3231

33-
#define MCU_EMC_IOCTL_REQUEST_DECLARATION(driver_name) \
34-
DEVFS_DRIVER_DECLARTION_IOCTL_REQUEST(driver_name, getinfo); \
35-
DEVFS_DRIVER_DECLARTION_IOCTL_REQUEST(driver_name, setattr); \
36-
DEVFS_DRIVER_DECLARTION_IOCTL_REQUEST(driver_name, setaction)
32+
#define MCU_EMC_IOCTL_REQUEST_DECLARATION(driver_name) \
33+
DEVFS_DRIVER_DECLARTION_IOCTL_REQUEST(driver_name, getinfo); \
34+
DEVFS_DRIVER_DECLARTION_IOCTL_REQUEST(driver_name, setattr); \
35+
DEVFS_DRIVER_DECLARTION_IOCTL_REQUEST(driver_name, setaction)
3736

38-
#define MCU_EMC_DRIVER_DECLARATION(variant) \
39-
DEVFS_DRIVER_DECLARTION(variant); \
40-
MCU_EMC_IOCTL_REQUEST_DECLARATION(variant)
37+
#define MCU_EMC_DRIVER_DECLARATION(variant) \
38+
DEVFS_DRIVER_DECLARTION(variant); \
39+
MCU_EMC_IOCTL_REQUEST_DECLARATION(variant)
4140

4241
MCU_EMC_DRIVER_DECLARATION(mcu_emc_sram);
4342
MCU_EMC_DRIVER_DECLARATION(mcu_emc_sdram);
@@ -53,4 +52,3 @@ MCU_EMC_DRIVER_DECLARATION(mcu_emc_fmc_ahb);
5352
#endif /* _EMC_H_ */
5453

5554
/*! @} */
56-

include/mcu/eth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ extern "C" {
2626
#endif
2727

2828
typedef struct MCU_PACK {
29-
u32 port;
3029
eth_attr_t attr; // default attributes
30+
u32 port;
3131
} eth_config_t;
3232

3333
int mcu_eth_open(const devfs_handle_t *handle) MCU_ROOT_CODE;

include/mcu/hash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
#include "sos/fs/devfs.h"
88

99
typedef struct {
10-
u32 port;
1110
hash_attr_t attr;
11+
u32 port;
1212
} hash_config_t;
1313

1414
typedef struct {
15-
u32 port;
1615
u32 attr;
16+
u32 port;
1717
} random_config_t;
1818

1919
typedef random_config_t rng_config_t;

include/mcu/i2c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ typedef struct {
2222
} i2c_event_t;
2323

2424
typedef struct MCU_PACK {
25-
u32 port;
2625
i2c_attr_t attr; // default attributes
26+
u32 port;
2727
} i2c_config_t;
2828

2929
int mcu_i2c_open(const devfs_handle_t *handle) MCU_ROOT_CODE;

include/mcu/i2s.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ extern "C" {
2626
#endif
2727

2828
typedef struct MCU_PACK {
29-
u32 port;
3029
i2s_attr_t attr; // default attributes
30+
u32 port;
3131
} i2s_config_t;
3232

3333
typedef struct MCU_PACK {

0 commit comments

Comments
 (0)