AG903ライブラリリファレンス
Body Source
AG903_GPIOMgrSetPortData 関数
本文ソース
コピコード
1: int32_t AG903_GPIOMgrSetPortData(uint8_t portch, uint32_t data, uint32_t target) 2: { 3: int32_t retval =
AG903_ENONE
; 4: uint32_t set; 5: uint32_t clr; 6: 7:
if
(
AG903_GPIO_CH_NUM
<= portch) { 8:
return
-
AG903_EINVAL
; 9: } 10: 11: set = (data&target); 12: clr = (~data&target); 13: 14:
#if
AG903_GPIO_USE_LDREX
15:
AG903_GPIOPrmModifyBit
(portch, set, clr,
true
); 16:
#else
17:
AG903_GPIOPrmModifyBit
(portch, set, clr,
false
); 18:
#endif
19: 20:
return
retval; 21: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.
内容
|
インデックス
|
ホーム