Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 63) sorted by relevance

123

/hal_nuvoton-latest/m46x/StdDriver/src/
Dcrypto.c126 uint32_t i, wcnt; in PRNG_Read() local
133 for(i = 0U; i < wcnt; i++) in PRNG_Read()
135 u32RandKey[i] = crpt->PRNG_KEY[i]; in PRNG_Read()
209 uint32_t i, wcnt, key_reg_addr; in AES_SetKey() local
216 for(i = 0U; i < wcnt; i++) in AES_SetKey()
218 outpw(key_reg_addr, au32Keys[i]); in AES_SetKey()
254 uint32_t i, key_reg_addr; in AES_SetInitVect() local
260 for(i = 0U; i < 4U; i++) in AES_SetInitVect()
262 outpw(key_reg_addr, au32IV[i]); in AES_SetInitVect()
349 uint32_t i, wcnt, reg_addr; in SHA_Read() local
[all …]
Drng.c51 int32_t i; in RNG_BasicConfig() local
62 if(i++ > timeout) break; /* Wait LIRC time-out */ in RNG_BasicConfig()
81 int32_t i; in RNG_Open() local
89 i = 0; in RNG_Open()
92 if(i++ > timeout) in RNG_Open()
103 i = 0; in RNG_Open()
106 if(i++ > timeout) in RNG_Open()
116 i = 0; in RNG_Open()
119 if(i++ > timeout) in RNG_Open()
143 int32_t i; in RNG_Random() local
[all …]
Dtrng.c66 uint32_t i, u32Reg, timeout; in TRNG_GenWord() local
71 for (i = 0; i < 4; i++) in TRNG_GenWord()
85 *u32RndNum |= ((TRNG->DATA & 0xff) << i*8); in TRNG_GenWord()
102 uint32_t i, u32Reg, timeout; in TRNG_GenBignum() local
106 for (i = 0; i < i32Len/8; i++) in TRNG_GenBignum()
120 u8BigNum[i] = (TRNG->DATA & 0xff); in TRNG_GenBignum()
136 uint32_t i, idx, u32Reg, timeout; in TRNG_GenBignumHex() local
141 for (i = 0; i < i32Len/8; i++) in TRNG_GenBignumHex()
Depwm.c135 uint32_t i; in EPWM_ConfigOutputChannel() local
168 i = (u32EPWMClockSrc / u32Frequency) / u32Prescale; in EPWM_ConfigOutputChannel()
170 if(i < (0x10000U)) in EPWM_ConfigOutputChannel()
172 u32CNR = i; in EPWM_ConfigOutputChannel()
177 i = u32EPWMClockSrc / (u32Prescale * u32CNR); in EPWM_ConfigOutputChannel()
194 return(i); in EPWM_ConfigOutputChannel()
224 uint32_t i; in EPWM_Stop() local
225 for(i = 0U; i < EPWM_CHANNEL_NUM; i ++) in EPWM_Stop()
227 if(u32ChannelMask & (1UL << i)) in EPWM_Stop()
229 (epwm)->PERIOD[i] = 0U; in EPWM_Stop()
[all …]
Dkpi.c51 int32_t i,j, idx, r; in KPI_IRQHandler() local
70 for(i=0;i<row;i++) in KPI_IRQHandler()
75 idx = (i < 4)?0:1; in KPI_IRQHandler()
76 r = i - idx * 4; in KPI_IRQHandler()
88 key.x = i; in KPI_IRQHandler()
100 for(i=0;i<row;i++) in KPI_IRQHandler()
105 idx = (i < 4)?0:1; in KPI_IRQHandler()
106 r = i - idx * 4; in KPI_IRQHandler()
119 key.x = i; in KPI_IRQHandler()
Dhsusbd.c434 uint32_t epNum, i; in HSUSBD_StandardRequest() local
439 for(i = 0ul; i < HSUSBD_MAX_EP; i++) in HSUSBD_StandardRequest()
441 … if((((HSUSBD->EP[i].EPCFG & 0xf0ul) >> 4) == epNum) && ((g_u32HsEpStallLock & (1ul << i)) == 0ul)) in HSUSBD_StandardRequest()
443 … HSUSBD->EP[i].EPRSPCTL = (HSUSBD->EP[i].EPRSPCTL & 0xeful) | HSUSBD_EP_RSPCTL_TOGGLE; in HSUSBD_StandardRequest()
550 uint32_t volatile i; in HSUSBD_UpdateDeviceState() local
552 for(i = 0ul; i < HSUSBD_MAX_EP; i++) in HSUSBD_UpdateDeviceState()
554 if((HSUSBD->EP[i].EPCFG & 0x1ul) == 0x1ul) in HSUSBD_UpdateDeviceState()
556 HSUSBD->EP[i].EPRSPCTL = HSUSBD_EP_RSPCTL_TOGGLE; in HSUSBD_UpdateDeviceState()
649 uint32_t volatile i, cnt; in HSUSBD_CtrlIn() local
655 for(i = 0ul; i < cnt; i++) in HSUSBD_CtrlIn()
[all …]
/hal_nuvoton-latest/m48x/StdDriver/src/
Dcrypto.c100 uint32_t i, wcnt; in PRNG_Read() local
104 for (i = 0U; i < wcnt; i++) in PRNG_Read()
106 u32RandKey[i] = crpt->PRNG_KEY[i]; in PRNG_Read()
178 uint32_t i, wcnt, key_reg_addr; in AES_SetKey() local
183 for (i = 0U; i < wcnt; i++) in AES_SetKey()
185 outpw(key_reg_addr, au32Keys[i]); in AES_SetKey()
199 uint32_t i, key_reg_addr; in AES_SetInitVect() local
203 for (i = 0U; i < 4U; i++) in AES_SetInitVect()
205 outpw(key_reg_addr, au32IV[i]); in AES_SetInitVect()
299 uint32_t i, reg_addr; in TDES_SetKey() local
[all …]
Dgpio.c41 uint32_t i; in GPIO_SetMode() local
43 for(i = 0ul; i < GPIO_PIN_MAX; i++) in GPIO_SetMode()
45 if((u32PinMask & (1ul << i))==(1ul << i)) in GPIO_SetMode()
47 port->MODE = (port->MODE & ~(0x3ul << (i << 1))) | (u32Mode << (i << 1)); in GPIO_SetMode()
108 uint32_t i; in GPIO_SetSlewCtl() local
110 for(i = 0ul; i < GPIO_PIN_MAX; i++) in GPIO_SetSlewCtl()
112 if(u32PinMask & (1ul << i)) in GPIO_SetSlewCtl()
114 port->SLEWCTL = (port->SLEWCTL & ~(0x3ul << (i << 1))) | (u32Mode << (i << 1)); in GPIO_SetSlewCtl()
135 uint32_t i; in GPIO_SetPullCtl() local
137 for(i = 0ul; i < GPIO_PIN_MAX; i++) in GPIO_SetPullCtl()
[all …]
Dtrng.c57 uint32_t i, u32Reg, timeout; in TRNG_GenWord() local
62 for (i = 0; i < 4; i++) in TRNG_GenWord()
76 *u32RndNum |= ((TRNG->DATA & 0xff) << i*8); in TRNG_GenWord()
93 uint32_t i, u32Reg, timeout; in TRNG_GenBignum() local
97 for (i = 0; i < i32Len/8; i++) in TRNG_GenBignum()
111 u8BigNum[i] = (TRNG->DATA & 0xff); in TRNG_GenBignum()
127 uint32_t i, idx, u32Reg, timeout; in TRNG_GenBignumHex() local
132 for (i = 0; i < i32Len/8; i++) in TRNG_GenBignumHex()
Dhsusbd.c415 uint32_t epNum, i; in HSUSBD_StandardRequest() local
420 for (i=0ul; i<HSUSBD_MAX_EP; i++) in HSUSBD_StandardRequest()
422 …if ((((HSUSBD->EP[i].EPCFG & 0xf0ul) >> 4) == epNum) && ((g_u32HsEpStallLock & (1ul << i)) == 0ul)) in HSUSBD_StandardRequest()
424 … HSUSBD->EP[i].EPRSPCTL = (HSUSBD->EP[i].EPRSPCTL & 0xeful) | HSUSBD_EP_RSPCTL_TOGGLE; in HSUSBD_StandardRequest()
524 uint32_t volatile i; in HSUSBD_UpdateDeviceState() local
526 for (i=0ul; i<HSUSBD_MAX_EP; i++) in HSUSBD_UpdateDeviceState()
528 if ((HSUSBD->EP[i].EPCFG & 0x1ul) == 0x1ul) in HSUSBD_UpdateDeviceState()
530 HSUSBD->EP[i].EPRSPCTL = HSUSBD_EP_RSPCTL_TOGGLE; in HSUSBD_UpdateDeviceState()
615 uint32_t volatile i, cnt; in HSUSBD_CtrlIn() local
621 for (i=0ul; i<cnt; i++) in HSUSBD_CtrlIn()
[all …]
Depwm.c139 uint32_t i; in EPWM_ConfigOutputChannel() local
172 i = (u32EPWMClockSrc / u32Frequency) / u32Prescale; in EPWM_ConfigOutputChannel()
174 if(i < (0x10000U)) in EPWM_ConfigOutputChannel()
176 u32CNR = i; in EPWM_ConfigOutputChannel()
181 i = u32EPWMClockSrc / (u32Prescale * u32CNR); in EPWM_ConfigOutputChannel()
199 return(i); in EPWM_ConfigOutputChannel()
229 uint32_t i; in EPWM_Stop() local
230 for(i = 0U; i < EPWM_CHANNEL_NUM; i ++) in EPWM_Stop()
232 if(u32ChannelMask & (1UL << i)) in EPWM_Stop()
234 (epwm)->PERIOD[i] = 0U; in EPWM_Stop()
[all …]
Demac.c194 uint32_t i = 0UL; in EMAC_PhyInit() local
212 if (i++ > 80000UL) /* Cable not connected */ in EMAC_PhyInit()
220 if (i <= 80000UL) in EMAC_PhyInit()
276 uint32_t i; in EMAC_TxDescInit() local
282 for (i = 0UL; i < EMAC_TX_DESC_SIZE; i++) in EMAC_TxDescInit()
287 tx_desc[i].u32Status1 = EMAC_TXFD_PADEN | EMAC_TXFD_CRCAPP | EMAC_TXFD_INTEN; in EMAC_TxDescInit()
291 … tx_desc[i].u32Status1 = EMAC_TXFD_PADEN | EMAC_TXFD_CRCAPP | EMAC_TXFD_INTEN | EMAC_TXFD_TTSEN; in EMAC_TxDescInit()
294 tx_desc[i].u32Data = (uint32_t)((uint32_t)&tx_buf[i]); in EMAC_TxDescInit()
295 tx_desc[i].u32Backup1 = tx_desc[i].u32Data; in EMAC_TxDescInit()
296 tx_desc[i].u32Status2 = 0UL; in EMAC_TxDescInit()
[all …]
/hal_nuvoton-latest/m2l31x/StdDriver/src/
Dgpio.c46 uint32_t i; in GPIO_SetMode() local
48 for(i = 0ul; i < GPIO_PIN_MAX; i++) in GPIO_SetMode()
50 if((u32PinMask & (1ul << i))==(1ul << i)) in GPIO_SetMode()
52 port->MODE = (port->MODE & ~(0x3ul << (i << 1))) | (u32Mode << (i << 1)); in GPIO_SetMode()
126 uint32_t i; in GPIO_SetSlewCtl() local
128 for(i = 0ul; i < GPIO_PIN_MAX; i++) in GPIO_SetSlewCtl()
130 if(u32PinMask & (1ul << i)) in GPIO_SetSlewCtl()
132 port->SLEWCTL = (port->SLEWCTL & ~(0x3ul << (i << 1))) | (u32Mode << (i << 1)); in GPIO_SetSlewCtl()
158 uint32_t i; in GPIO_SetPullCtl() local
160 for(i = 0ul; i < GPIO_PIN_MAX; i++) in GPIO_SetPullCtl()
[all …]
Drng.c35 int32_t i; in RNG_Open() local
42 i = 0; in RNG_Open()
45 if(i++ > timeout) in RNG_Open()
56 i = 0; in RNG_Open()
59 if(i++ > timeout) in RNG_Open()
83 int32_t i; in RNG_Random() local
86 i = 0; in RNG_Random()
99 pu32Buf[i++] = TRNG->DATA[0]; in RNG_Random()
101 pu32Buf[i++] = TRNG->DATA[1]; in RNG_Random()
103 pu32Buf[i++] = TRNG->DATA[2]; in RNG_Random()
[all …]
Dtrng.c82 uint32_t i, u32Reg, timeout; in TRNG_GenWord() local
113 uint32_t i, j, u32Reg, timeout; in TRNG_GenBignum() local
115 for (i = 0; i < i32Len/8; i++) in TRNG_GenBignum()
118 if((i & 0x3) == 0) in TRNG_GenBignum()
136 u8BigNum[i] = (u32Reg >> (j * 8)) & 0xff; in TRNG_GenBignum()
154 uint32_t i, j, u32Reg, timeout, ch,cl; in TRNG_GenBignumHex() local
156 for(i = 0; i < i32Len / 8; i++) in TRNG_GenBignumHex()
159 if((i & 0x3) == 0) in TRNG_GenBignumHex()
182 cBigNumHex[i * 2] = ch - 0xa + 'a'; in TRNG_GenBignumHex()
184 cBigNumHex[i * 2] = ch + '0'; in TRNG_GenBignumHex()
[all …]
Dcrypto.c102 uint32_t i, wcnt; in PRNG_Read() local
109 for(i = 0U; i < wcnt; i++) in PRNG_Read()
111 u32RandKey[i] = crpt->PRNG_KEY[i]; in PRNG_Read()
185 uint32_t i, wcnt, key_reg_addr; in AES_SetKey() local
192 for(i = 0U; i < wcnt; i++) in AES_SetKey()
194 outpw(key_reg_addr, au32Keys[i]); in AES_SetKey()
208 uint32_t i, key_reg_addr; in AES_SetInitVect() local
214 for(i = 0U; i < 4U; i++) in AES_SetInitVect()
216 outpw(key_reg_addr, au32IV[i]); in AES_SetInitVect()
Dpwm.c113 uint32_t i; in PWM_ConfigOutputChannel() local
143 i = (u32PWMClockSrc / u32Frequency) / u16Prescale; in PWM_ConfigOutputChannel()
145 if(i > (0x10000)) in PWM_ConfigOutputChannel()
148 u16CNR = i; in PWM_ConfigOutputChannel()
152 i = u32PWMClockSrc / (u16Prescale * u16CNR); in PWM_ConfigOutputChannel()
168 return(i); in PWM_ConfigOutputChannel()
183 uint32_t i; in PWM_Start() local
185 for (i = 0UL; i < PWM_CHANNEL_NUM; i ++) in PWM_Start()
187 if (u32ChannelMask & (1UL << i)) in PWM_Start()
189 (pwm)->CNTEN |= (1UL << ((i >> 1UL) << 1UL)); in PWM_Start()
[all …]
Dlpgpio.c40 uint32_t i; in LPGPIO_SetMode() local
42 for(i = 0ul; i < LPGPIO_PIN_MAX; i++) in LPGPIO_SetMode()
44 if((u32PinMask & (BIT0 << i))==(BIT0 << i)) in LPGPIO_SetMode()
46 port->MODE = (port->MODE & ~(BIT0 << i)) | (u32Mode << i); in LPGPIO_SetMode()
Depwm.c137 uint32_t i; in EPWM_ConfigOutputChannel() local
170 i = (u32EPWMClockSrc / u32Frequency) / u32Prescale; in EPWM_ConfigOutputChannel()
172 if(i < (0x10000U)) in EPWM_ConfigOutputChannel()
174 u32CNR = i; in EPWM_ConfigOutputChannel()
179 i = u32EPWMClockSrc / (u32Prescale * u32CNR); in EPWM_ConfigOutputChannel()
197 return(i); in EPWM_ConfigOutputChannel()
227 uint32_t i; in EPWM_Stop() local
228 for(i = 0U; i < EPWM_CHANNEL_NUM; i ++) in EPWM_Stop()
230 if(u32ChannelMask & (1UL << i)) in EPWM_Stop()
232 (epwm)->PERIOD[i] = 0U; in EPWM_Stop()
[all …]
/hal_nuvoton-latest/m48x/StdDriver/inc/
Dhsusbd.h169 uint32_t i = 0ul; in HSUSBD_MemCopy() local
173 u8Dst[i] = u8Src[i]; in HSUSBD_MemCopy()
174 i++; in HSUSBD_MemCopy()
264 uint32_t i; in HSUSBD_SetStall() local
272 for (i=0ul; i<HSUSBD_MAX_EP; i++) in HSUSBD_SetStall()
274 if (((HSUSBD->EP[i].EPCFG & 0xf0ul) >> 4) == u32EpNum) in HSUSBD_SetStall()
276 HSUSBD->EP[i].EPRSPCTL = (HSUSBD->EP[i].EPRSPCTL & 0xf7ul) | HSUSBD_EP_RSPCTL_HALT; in HSUSBD_SetStall()
303 uint32_t i; in HSUSBD_ClearStall() local
305 for (i=0ul; i<HSUSBD_MAX_EP; i++) in HSUSBD_ClearStall()
307 if (((HSUSBD->EP[i].EPCFG & 0xf0ul) >> 4) == u32EpNum) in HSUSBD_ClearStall()
[all …]
Dusbd.h552 uint32_t volatile i=0ul; in USBD_MemCopy() local
556 dest[i] = src[i]; in USBD_MemCopy()
557 i++; in USBD_MemCopy()
575 uint32_t i; in USBD_SetStall() local
577 for(i = 0ul; i < USBD_MAX_EP; i++) in USBD_SetStall()
579 u32CfgAddr = (uint32_t)(i << 4) + (uint32_t)&USBD->EP[0].CFG; /* USBD_CFG0 */ in USBD_SetStall()
584 u32CfgAddr = (uint32_t)(i << 4) + (uint32_t)&USBD->EP[0].CFGP; /* USBD_CFGP0 */ in USBD_SetStall()
606 uint32_t i; in USBD_ClearStall() local
608 for(i = 0ul; i < USBD_MAX_EP; i++) in USBD_ClearStall()
610 u32CfgAddr = (uint32_t)(i << 4) + (uint32_t)&USBD->EP[0].CFG; /* USBD_CFG0 */ in USBD_ClearStall()
[all …]
Depwm.h264 int i;\
265 for(i = 0; i < 6; i++) { \
266 if((u32ChannelMask) & (1 << i)) \
267 (epwm)->SSCTL &= ~(1UL << i); \
425 int i; \
426 for(i = 0; i < 6; i++) { \
427 if((u32ChannelMask) & (1 << i)) \
428 … (epwm)->CTL1 = (((epwm)->CTL1 & ~(3UL << (i << 1))) | ((u32AlignedType) << (i << 1))); \
496 int i; \
497 for(i = 0; i < 6; i++) { \
[all …]
/hal_nuvoton-latest/m46x/StdDriver/inc/
Dhsusbd.h198 uint32_t i = 0ul; in HSUSBD_MemCopy() local
202 u8Dst[i] = u8Src[i]; in HSUSBD_MemCopy()
203 i++; in HSUSBD_MemCopy()
293 uint32_t i; in HSUSBD_SetStall() local
301 for (i=0ul; i<HSUSBD_MAX_EP; i++) in HSUSBD_SetStall()
303 if (((HSUSBD->EP[i].EPCFG & 0xf0ul) >> 4) == u32EpNum) in HSUSBD_SetStall()
305 HSUSBD->EP[i].EPRSPCTL = (HSUSBD->EP[i].EPRSPCTL & 0xf7ul) | HSUSBD_EP_RSPCTL_HALT; in HSUSBD_SetStall()
332 uint32_t i; in HSUSBD_ClearStall() local
334 for (i=0ul; i<HSUSBD_MAX_EP; i++) in HSUSBD_ClearStall()
336 if (((HSUSBD->EP[i].EPCFG & 0xf0ul) >> 4) == u32EpNum) in HSUSBD_ClearStall()
[all …]
Dusbd.h688 uint32_t volatile i=0ul; in USBD_MemCopy() local
692 dest[i] = src[i]; in USBD_MemCopy()
693 i++; in USBD_MemCopy()
711 uint32_t i; in USBD_SetStall() local
713 for(i = 0ul; i < USBD_MAX_EP; i++) in USBD_SetStall()
715 u32CfgAddr = (uint32_t)(i << 4) + (uint32_t)&USBD->EP[0].CFG; /* USBD_CFG0 */ in USBD_SetStall()
720 u32CfgAddr = (uint32_t)(i << 4) + (uint32_t)&USBD->EP[0].CFGP; /* USBD_CFGP0 */ in USBD_SetStall()
743 uint32_t i; in USBD_ClearStall() local
745 for(i = 0ul; i < USBD_MAX_EP; i++) in USBD_ClearStall()
747 u32CfgAddr = (uint32_t)(i << 4) + (uint32_t)&USBD->EP[0].CFG; /* USBD_CFG0 */ in USBD_ClearStall()
[all …]
/hal_nuvoton-latest/m2l31x/StdDriver/inc/
Dpwm.h258 int i;\
259 for(i = 0; i < 6; i++) { \
260 if((u32ChannelMask) & (1 << i)) \
261 (pwm)->SSCTL &= ~(1UL << i); \
419 int i; \
420 for(i = 0; i < 6; i++) { \
421 if((u32ChannelMask) & (1 << i)) \
422 … (pwm)->CTL1 = (((pwm)->CTL1 & ~(3UL << (i << 1))) | ((u32AlignedType) << (i << 1))); \
490 int i; \
491 for(i = 0; i < 6; i++) { \
[all …]

123