/ * @brief * Sets up GPIO output from the ACMP. * * @note * GPIO must be enabled in the CMU before this function call, i.e. * @verbatim CMU_ClockEnable(cmuClock_GPIO, true); @endverbatim * * @param[in] acmp * Pointer to the ACMP peripheral register block. * * @param location * The pin location to use. See the datasheet for location to pin mappings. * * @param enable * Enab
| 214 | * Invert output. |
| 215 | ******************************************************************************/ |
| 216 | void ACMP_GPIOSetup(ACMP_TypeDef *acmp, uint32_t location, bool enable, bool invert) |
| 217 | { |
| 218 | /* Sanity checking of location */ |
| 219 | EFM_ASSERT(location < 4); |
| 220 | |
| 221 | /* Set GPIO inversion */ |
| 222 | SET_BIT_FIELD(acmp->CTRL, _ACMP_CTRL_GPIOINV_MASK, invert, |
| 223 | _ACMP_CTRL_GPIOINV_SHIFT); |
| 224 | |
| 225 | acmp->ROUTE = (location << _ACMP_ROUTE_LOCATION_SHIFT) |
| 226 | | (enable << _ACMP_ROUTE_ACMPPEN_SHIFT); |
| 227 | } |
| 228 | |
| 229 | /***************************************************************************//** |
| 230 | * @brief |