/ * @brief * Sets which channels should be used in ACMP comparisons. * * @param[in] acmp * Pointer to the ACMP peripheral register block. * * @param negSel * Channel to use on the negative input to the ACMP. * * @param posSel * Channel to use on the positive input to the ACMP. ******************************************************************************/
| 240 | * Channel to use on the positive input to the ACMP. |
| 241 | ******************************************************************************/ |
| 242 | void ACMP_ChannelSet(ACMP_TypeDef *acmp, ACMP_Channel_TypeDef negSel, |
| 243 | ACMP_Channel_TypeDef posSel) |
| 244 | { |
| 245 | /* Make sure that only external channels are used as ACMP positive input */ |
| 246 | EFM_ASSERT(posSel < _ACMP_INPUTSEL_NEGSEL_1V25); |
| 247 | /* Sanity checking of ACMP negative input */ |
| 248 | EFM_ASSERT(negSel <= _ACMP_INPUTSEL_NEGSEL_VDD); |
| 249 | |
| 250 | acmp->INPUTSEL = (acmp->INPUTSEL & ~(_ACMP_INPUTSEL_POSSEL_MASK | |
| 251 | _ACMP_INPUTSEL_NEGSEL_MASK)) |
| 252 | | (negSel << _ACMP_INPUTSEL_NEGSEL_SHIFT) |
| 253 | | (posSel << _ACMP_INPUTSEL_POSSEL_SHIFT); |
| 254 | } |
| 255 | |
| 256 | /***************************************************************************//** |
| 257 | * @brief |