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
596 B
19 lines
596 B
2 years ago
|
#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){
|
||
2 years ago
|
HAL_GPIO_WritePin(GPIOA, CAMERA_EN_Pin, (GPIO_PinState)!state);
|
||
2 years ago
|
}
|