Initial commit: TXW82x FPV v2.7.0.7-42229 SDK + project sources

This commit is contained in:
2026-07-06 11:30:13 +08:00
commit e76462eeb7
3451 changed files with 1415300 additions and 0 deletions

39
sdk/hal/rotate.c Normal file
View File

@@ -0,0 +1,39 @@
#include "typesdef.h"
#include "list.h"
#include "errno.h"
#include "dev.h"
#include "devid.h"
#include "hal/rotate.h"
int32 rotate_set_addr(struct rotate_device *p_rot, uint32_t src, uint32_t des)
{
if (p_rot && ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl) {
return ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl(p_rot, ROTATE_IOCTL_CMD_SET_ADDR, src, des);
}
return RET_ERR;
}
int32 rotate_set_size(struct rotate_device *p_rot, uint16_t w, uint16_t h)
{
if (p_rot && ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl) {
return ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl(p_rot, ROTATE_IOCTL_CMD_SET_SIZE, w, h);
}
return RET_ERR;
}
int32 rotate_run(struct rotate_device *p_rot, uint8_t angle, uint8_t bit_width)
{
if (p_rot && ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl) {
return ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl(p_rot, ROTATE_IOCTL_CMD_SET_ANALE_RUN, angle, bit_width);
}
return RET_ERR;
}
int32 rotate_get_sta(struct rotate_device *p_rot){
if (p_rot && ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl) {
return ((const struct rotate_hal_ops *)p_rot->dev.ops)->ioctl(p_rot, ROTATE_IOCTL_CMD_GET_STA, 0,0);
}
return RET_ERR;
}