void BoardDeInitMcu( void ) { Gpio_t oscHseIn; Gpio_t oscHseOut; Gpio_t oscLseIn; Gpio_t oscLseOut; I2cDeInit( &I2c ); SpiDeInit( &SX1272.Spi ); SX1272IoDeInit( ); #if defined( USE_DEBUG_PINS ) GpioInit( &DbgPin1, CON_EXT_1, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &DbgPin2, CON_EXT_3, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &DbgPin3, CON_EXT_7, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &DbgPin4, CON_EXT_9, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); #endif GpioInit( &oscHseIn, OSC_HSE_IN, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &oscHseOut, OSC_HSE_OUT, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &oscLseIn, OSC_LSE_IN, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); GpioInit( &oscLseOut, OSC_LSE_OUT, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); McuInitialized = false; }
void BoardDeInitMcu( void ) { I2cDeInit( &I2c ); AdcDeInit( &Adc ); SpiDeInit( &SX1272.Spi ); SX1272IoDeInit( ); }
void BoardDeInitMcu( void ) { #if defined(SX1276_BOARD_EMBED) SpiDeInit(&SX1276.Spi); SX1276IoDeInit(); #endif McuInitialized = false; }
void BoardDeInitMcu( void ) { Gpio_t ioPin; SpiDeInit( &SX1272.Spi ); SX1272IoDeInit( ); GpioInit( &ioPin, OSC_HSE_IN, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &ioPin, OSC_HSE_OUT, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &ioPin, OSC_LSE_IN, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); GpioInit( &ioPin, OSC_LSE_OUT, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); }
void hw_net_disable (void) { CC3000_START; wlan_stop(); SpiDeInit(); // clear out all wifi data memset(hw_wifi_ip, 0, sizeof hw_wifi_ip); memset(hw_wifi_ip, 0, sizeof hw_cc_ver); // reset connection ulCC3000Connected = 0; ulCC3000DHCP = 0; hw_digital_write(CC3K_CONN_LED, 0); hw_digital_write(CC3K_ERR_LED, 0); CC3000_END; }
void BoardDeInitMcu( void ) { Gpio_t ioPin; I2cDeInit( &I2c ); SpiDeInit( &SX1276.Spi ); SX1276IoDeInit( ); LedDeInit(); /*GpioInit( &Led1, LED_1, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &Led2, LED_2, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &Led3, LED_3, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &Led4, LED_4, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 );*/ /*Led3Status = GpioRead( &Led3 ); if( Led3Status == 1 ) { GpioInit( &Led3, LED_3, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); }*/ /*GpioInit( &Sel1, SEL_1, PIN_OUTPUT, PIN_OPEN_DRAIN, PIN_NO_PULL, 0 ); GpioInit( &Sel2, SEL_2, PIN_OUTPUT, PIN_OPEN_DRAIN, PIN_NO_PULL, 0 ); GpioInit( &Sel3, SEL_3, PIN_OUTPUT, PIN_OPEN_DRAIN, PIN_NO_PULL, 0 ); GpioInit( &Sel4, SEL_4, PIN_OUTPUT, PIN_OPEN_DRAIN, PIN_NO_PULL, 0 );*/ #if ( defined( USE_DEBUG_PINS ) && !defined( LOW_POWER_MODE_ENABLE ) ) GpioInit( &DbgPin1, J1_1, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &DbgPin2, J1_2, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &DbgPin3, J1_3, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &DbgPin4, J1_4, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); #endif /*GpioInit( &ioPin, OSC_HSE_IN, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &ioPin, OSC_HSE_OUT, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &ioPin, OSC_LSE_IN, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); GpioInit( &ioPin, OSC_LSE_OUT, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 );*/ McuInitialized = false; }
void BoardDeInitMcu( void ) { Gpio_t oscHseIn; Gpio_t oscHseOut; Gpio_t oscLseIn; Gpio_t oscLseOut; I2cDeInit( &I2c ); SpiDeInit( &SX1276.Spi ); SX1276IoDeInit( ); GpioInit( &oscHseIn, OSC_HSE_IN, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &oscHseOut, OSC_HSE_OUT, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &oscLseIn, OSC_LSE_IN, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &oscLseOut, OSC_LSE_OUT, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &UsbDetect, USB_ON, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); McuInitialized = false; }
void BoardDeInitMcu( void ) { /* Switching the CPU clock source to HFRCO */ CMU_ClockSelectSet(cmuClock_HF, cmuSelect_HFRCO); /* Disabling every oscillator except hfrco and lfxo */ CMU_OscillatorEnable(cmuOsc_AUXHFRCO, false, true); CMU_OscillatorEnable(cmuOsc_HFXO, false, true); CMU_OscillatorEnable(cmuOsc_LFRCO, false, true); #ifdef USE_I2C I2cDeInit( &I2c ); #endif SpiDeInit( &SX1272.Spi ); SX1272IoDeInit( ); GpioInit( &Led1, LED_1, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); GpioInit( &Led2, LED_2, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); McuInitialized = false; }
void BoardDeInitMcu( void ) { Gpio_t ioPin; //I2cDeInit( &I2c ); SpiDeInit( &SX1272.Spi ); SX1272IoDeInit( ); //#if ( defined( USE_DEBUG_PINS ) && !defined( LOW_POWER_MODE_ENABLE ) ) // GpioInit( &DbgPin1, CON_EXT_1, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); // GpioInit( &DbgPin2, CON_EXT_3, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); // GpioInit( &DbgPin3, CON_EXT_7, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); // GpioInit( &DbgPin4, CON_EXT_9, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 0 ); //#endif GpioInit( &ioPin, OSC_HSE_IN, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &ioPin, OSC_HSE_OUT, PIN_ANALOGIC, PIN_PUSH_PULL, PIN_NO_PULL, 1 ); GpioInit( &ioPin, OSC_LSE_IN, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); GpioInit( &ioPin, OSC_LSE_OUT, PIN_INPUT, PIN_PUSH_PULL, PIN_PULL_DOWN, 1 ); McuInitialized = false; }