You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
595 B
19 lines
595 B
#include "butcube_imager.hpp"
|
|
|
|
int ButCube_imager::Transmit(vector<uint8_t> source){
|
|
for( auto &uart_output : uart_output_interfaces){
|
|
HAL_UART_Transmit(&uart_output, source.data(), source.size(), HAL_MAX_DELAY);
|
|
HAL_Delay(200);
|
|
}
|
|
return uart_output_interfaces.size() * source.size();
|
|
}
|
|
|
|
int ButCube_imager::Add_output(UART_HandleTypeDef uart_output){
|
|
uart_output_interfaces.emplace_back(uart_output);
|
|
return uart_output_interfaces.size();
|
|
}
|
|
|
|
void ButCube_imager::Camera_power(bool state){
|
|
HAL_GPIO_WritePin(GPIOB, CAMERA_CS_Pin, (GPIO_PinState)state);
|
|
}
|