本文整理汇总了C++中Usart::Stop方法的典型用法代码示例。如果您正苦于以下问题:C++ Usart::Stop方法的具体用法?C++ Usart::Stop怎么用?C++ Usart::Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Usart
的用法示例。
在下文中一共展示了Usart::Stop方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: uart_stop
void uart_stop()
{
uart.Stop();
//disable usart
DEBUG_UART_PWR_OFF;
}
示例2: bt_module_deinit
void bt_module_deinit()
{
GpioWrite(BT_EN, LOW);
GpioWrite(BT_RESET, LOW);
bt_irgh(BT_IRQ_DEINIT, 0);
bt_uart.Stop();
BT_UART_PWR_OFF;
}
示例3: bt_module_reset
void bt_module_reset()
{
GpioWrite(BT_EN, LOW);
GpioWrite(BT_RESET, LOW);
bt_uart.Stop();
BT_UART_PWR_OFF;
bt_reset_counter = task_get_ms_tick() + 4000;
bt_reset_counter_step = 0;
}
示例4: gps_stop
void gps_stop()
{
GpioSetDirection(GPS_EN, INPUT);
GpioSetDirection(GPS_RESET, INPUT);
fc.gps_data.valid = false;
fc.gps_data.fix = 0;
fc.gps_data.fix_cnt = 0;
GpioSetPull(GPS_TIMER, gpio_totem);
gps_init_ok = false;
gps_uart.Stop();
GPS_UART_PWR_OFF;
}
示例5: storage_deinit
void storage_deinit()
{
DEBUG("storage_deinit\n");
if (!sd_avalible)
return;
uint8_t res;
res = f_mount(NULL, "", 1); //unmount
sd_spi_usart.Stop();
sd_avalible = false;
//power spi & sdcard
SD_EN_OFF;
SD_SPI_PWR_OFF;
}
示例6: storage_init
bool storage_init()
{
uint8_t res;
GpioSetPull(SD_IN, gpio_pull_up);
GpioSetDirection(SD_IN, INPUT);
DEBUG("SD_IN %d\n", GpioRead(SD_IN));
if (!SD_CARD_DETECT)
return false;
//power spi & sdcard
SD_EN_ON;
SD_SPI_PWR_ON;
DEBUG("Mounting SD card ... ");
for (uint8_t i = 0; i < 5; i++)
{
//power spi & sdcard
SD_EN_ON;
SD_SPI_PWR_ON;
res = f_mount(&FatFs, "", 1); /* Give a work area to the default drive */
DEBUG("%d ", i + 1);
if (res == RES_OK)
break;
sd_spi_usart.Stop();
//power spi & sdcard
SD_EN_OFF;
SD_SPI_PWR_OFF;
for (uint8_t j = 0; j < i +1; j++)
_delay_ms(10);
}
if (res != RES_OK)
{
DEBUG("Error %02X\n", res);
sd_spi_usart.Stop();
//power spi & sdcard
SD_EN_OFF;
SD_SPI_PWR_OFF;
sd_avalible = false;
return false;
}
DEBUG("OK\n");
uint32_t size;
FATFS * FatFs1;
res = f_getfree("", &size, &FatFs1);
// DEBUG1("f_getfree res = %d, size = %lu MiB", res, size / 256);
uint32_t sector_count;
res = disk_ioctl(0, GET_SECTOR_COUNT, §or_count);
// DEBUG1("GET_SECTOR_COUNT res = %d, size = %lu", res, sector_count);
uint16_t sector_size;
res = disk_ioctl(0, GET_SECTOR_SIZE, §or_size);
// DEBUG1("GET_SECTOR_SIZE res = %d, size = %u", res, sector_size);
storage_space = sector_count * sector_size;
storage_free_space = size * 4 * 1024;
DEBUG("Disk info\n");
DEBUG(" sector size %12u\n", sector_size);
DEBUG(" sector count %12lu\n", sector_count);
DEBUG(" total space %12lu\n", storage_space);
DEBUG(" free space %12lu\n", storage_free_space);
sd_avalible = true;
return true;
}
示例7: gps_change_uart_baudrate
void gps_change_uart_baudrate()
{
gps_uart.Stop();
gps_uart.Init(GPS_UART, 115200);
}