mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
fix warning for ac5
This commit is contained in:
parent
6d93b36954
commit
86377d1a3c
@ -144,4 +144,4 @@ exit:
|
||||
void STM32F1_ADC_platformRead(PikaObj* self) {
|
||||
char *pin = obj_getStr(self, "pin");
|
||||
obj_setFloat(self, "val", 3.3f * Get_Adc(&pika_hadc1, getChannel(pin)) / 4096.0f);
|
||||
}
|
||||
}
|
||||
|
@ -168,4 +168,4 @@ int STM32F1_lowLevel_readPin(PikaObj *self, char * pin){
|
||||
obj_setSysOut(self, "[error] not match gpio pin.");
|
||||
}
|
||||
return HAL_GPIO_ReadPin(gpioPort,gpioPin);
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ uint8_t READ_SDA(pika_IIC_info* iic) {
|
||||
}
|
||||
|
||||
void WRITE_SDA(pika_IIC_info* iic, uint8_t data) {
|
||||
HAL_GPIO_WritePin(iic->SDA_GPIO, iic->SDA_GPIO_Pin, data);
|
||||
HAL_GPIO_WritePin(iic->SDA_GPIO, iic->SDA_GPIO_Pin, (GPIO_PinState) data);
|
||||
}
|
||||
|
||||
void IIC_Start(pika_IIC_info* iic) {
|
||||
@ -253,4 +253,4 @@ void STM32F1_IIC_platformWrite(PikaObj* self) {
|
||||
pika_IIC_info* iic = obj_getPtr(self, "iic");
|
||||
|
||||
MPU_Write_Len(iic, iic->deviceAddr, addr, strGetSize(data), (uint8_t*)data);
|
||||
}
|
||||
}
|
||||
|
@ -320,4 +320,4 @@ void STM32F1_PWM_platformSetFrequency(PikaObj* self) {
|
||||
__HAL_TIM_SET_COMPARE(pika_tim, getTimChennel(pin),
|
||||
(uint32_t)(pika_tim->Init.Period * duty));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,4 @@ void STM32F1_Time_sleep_s(PikaObj* self, int s) {
|
||||
for (int i = 0; i < s; i++) {
|
||||
HAL_Delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,14 +50,6 @@ static void setUartObj(uint8_t id, PikaObj* obj) {
|
||||
pika_uart->obj = obj;
|
||||
}
|
||||
|
||||
static PikaObj* getUartObj(uint8_t id) {
|
||||
pika_uart_t* pika_uart = getPikaUart(id);
|
||||
if (NULL == pika_uart) {
|
||||
return NULL;
|
||||
}
|
||||
return pika_uart->obj;
|
||||
}
|
||||
|
||||
static USART_TypeDef* getUartInstance(uint8_t id) {
|
||||
#ifdef UART1_EXIST
|
||||
if (1 == id) {
|
||||
@ -310,7 +302,6 @@ void STM32F1_UART_platformRead(PikaObj* self) {
|
||||
UART_Start_Receive_IT(
|
||||
&pika_uart->huart,
|
||||
(uint8_t*)(pika_uart->rxBuff + pika_uart->rxBuffOffset), 1);
|
||||
exit:
|
||||
args_deinit(buffs);
|
||||
obj_setStr(self,"readData", readBuff);
|
||||
}
|
||||
|
@ -165,4 +165,4 @@ uint8_t enableClk(char* pin) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ void delay_us(uint32_t delay);
|
||||
void delay_unit(uint32_t delay);
|
||||
void STM32_UART_clearRxBuff(pika_uart_t* pika_uart);
|
||||
uint8_t STM32_Code_reciveHandler(char *data, uint32_t rxSize);
|
||||
void STM32_Code_Init();
|
||||
void STM32_Code_flashHandler();
|
||||
void HARDWARE_PRINTF_Init();
|
||||
#endif
|
||||
void STM32_Code_Init(void);
|
||||
void STM32_Code_flashHandler(void);
|
||||
void HARDWARE_PRINTF_Init(void);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user