46 lines
1.7 KiB
C
46 lines
1.7 KiB
C
|
|
#ifndef __BSP_MOS_H
|
||
|
|
#define __BSP_MOS_H
|
||
|
|
#include "at32a423.h"
|
||
|
|
|
||
|
|
#define MOS(x) ((uint32_t)((uint32_t)0x01U<<(x)))
|
||
|
|
|
||
|
|
#define ALL_PRESSURIZE_MOS MOS(0)|MOS(1)|MOS(2)|MOS(3)|MOS(4)|MOS(5)|MOS(6)|MOS(7)|MOS(8)|MOS(9)
|
||
|
|
#define ALL_INLET_MOS MOS(10)|MOS(11)|MOS(12)|MOS(13)|MOS(14)|MOS(15)|MOS(16)|MOS(17)|MOS(18)|MOS(19)
|
||
|
|
#define ALL_MOS 0XFFFFFFFF
|
||
|
|
|
||
|
|
typedef union
|
||
|
|
{
|
||
|
|
__IO uint32_t mos;
|
||
|
|
struct
|
||
|
|
{
|
||
|
|
__IO uint32_t mos0 : 1; /* [0] */
|
||
|
|
__IO uint32_t mos1 : 1; /* [1] */
|
||
|
|
__IO uint32_t mos2 : 1; /* [2] */
|
||
|
|
__IO uint32_t mos3 : 1; /* [3] */
|
||
|
|
__IO uint32_t mos4 : 1; /* [4] */
|
||
|
|
__IO uint32_t mos5 : 1; /* [5] */
|
||
|
|
__IO uint32_t mos6 : 1; /* [6] */
|
||
|
|
__IO uint32_t mos7 : 1; /* [7] */
|
||
|
|
__IO uint32_t mos8 : 1; /* [8] */
|
||
|
|
__IO uint32_t mos9 : 1; /* [9] */
|
||
|
|
__IO uint32_t mos10 : 1; /* [10] */
|
||
|
|
__IO uint32_t mos11 : 1; /* [11] */
|
||
|
|
__IO uint32_t mos12 : 1; /* [12] */
|
||
|
|
__IO uint32_t mos13 : 1; /* [13] */
|
||
|
|
__IO uint32_t mos14 : 1; /* [14] */
|
||
|
|
__IO uint32_t mos15 : 1; /* [15] */
|
||
|
|
__IO uint32_t mos16 : 1; /* [16] */
|
||
|
|
__IO uint32_t mos17 : 1; /* [17] */
|
||
|
|
__IO uint32_t mos18 : 1; /* [18] */
|
||
|
|
__IO uint32_t mos19 : 1; /* [19] */
|
||
|
|
__IO uint32_t mos20 : 1; /* [20] */
|
||
|
|
__IO uint32_t reserved1 : 11;/* [31:21] */
|
||
|
|
} mos_bit;
|
||
|
|
}mos_union;
|
||
|
|
|
||
|
|
void mos_init(void);
|
||
|
|
void mos_set(mos_union mos_data);
|
||
|
|
#endif
|
||
|
|
|
||
|
|
|