Beispiel #1
0
/**
 * @brief   Deactivates the MAC peripheral.
 *
 * @param[in] macp      pointer to the @p MACDriver object
 *
 * @api
 */
void macStop(MACDriver *macp) {

  osalDbgCheck(macp != NULL);

  osalSysLock();
  osalDbgAssert((macp->state == MAC_STOP) || (macp->state == MAC_ACTIVE),
                "invalid state");
  mac_lld_stop(macp);
  macp->state = MAC_STOP;
  osalSysUnlock();
}
Beispiel #2
0
/**
 * @brief   Deactivates the MAC peripheral.
 *
 * @param[in] macp      pointer to the @p MACDriver object
 *
 * @api
 */
void macStop(MACDriver *macp) {

  chDbgCheck(macp != NULL, "macStop");

  chSysLock();
  chDbgAssert((macp->state == MAC_STOP) || (macp->state == MAC_ACTIVE),
              "macStop(), #1", "invalid state");
  mac_lld_stop(macp);
  macp->state = MAC_STOP;
  chSysUnlock();
}