AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_EQSCtlInit(uint16_t div, uint16_t cnt) 2: { 3: int32_t rc = AG903_ENONE; 4: const uint32_t clk3KHz = (AG903_EQS_SYS_CLK / (3 * 1000)); 5: const uint32_t clk100MHz = (AG903_EQS_SYS_CLK / (100 * 1000 * 1000)); 6: 7: if ((div > clk3KHz) || (div < clk100MHz)) { 8: 9: rc = -AG903_EINVAL; 10: } 11: 12: if (rc == AG903_ENONE) { 13: AG903_EQSPrmSetMOD(AG903_EQS_MODE_NORM); 14: AG903_EQSPrmSetDivide(div); 15: AG903_EQSPrmSetWaitCycle(cnt); 16: } 17: 18: return rc; 19: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.