Tina3.5文档/TinaTest文档/音频功能测试文档.pdf
Tina3.5文档/TinaTest文档/Tina量产测试使用文档.pdf
Tina3.5文档/TinaTest文档/TinaTest使用说明.pdf
Tina3.5文档/minigui/MiniGUI编程指南V3.0.pdf
Tina3.5文档/minigui/minigui_per_view视频小视窗播放.pdf
Tina3.5文档/minigui/MiniGUI TTF旋转字库制作并竖直显示文字.pdf
Tina3.5文档/minigui/MiniGUI配置指南.pdf
Tina3.5文档/minigui/MiniGUI更换键盘皮肤.pdf
Tina3.5文档/minigui/minigui3.2裁剪.pdf
Tina3.5文档/minigui/Ubuntu 64位移植Minigui3.2.pdf
Tina3.5文档/系统文档/TinaLinux_SDK开发指南.pdf
Tina3.5文档/系统文档/GPU性能说明文档.pdf
Tina3.5文档/系统文档/TinaLinux_启动优化开发指南.pdf
Tina3.5文档/系统文档/TinaLinux_功耗管理开发指南.pdf
Tina3.5文档/系统文档/TinaLinux_系统调试指南.pdf
Tina3.5文档/系统文档/TinaLinux_syslog使用指南.pdf
Tina3.5文档/系统文档/TinaLinux_系统配置说明文档.pdf
Tina3.5文档/系统文档/TinaLinux_WIFI_BT_性能测试指南.pdf
Tina3.5文档/系统文档/TinaLinux_系统裁剪开发指南.pdf
Tina3.5文档/系统文档/flash性能说明.pdf
Tina3.5文档/ISP调试文档/新版HawkviewTools使用说明书_V1.3.pdf
Tina3.5文档/ISP调试文档/图像质量调优指南_V1_4.pdf
Tina3.5文档/ISP调试文档/isp参数详解_v1.1.pdf
Tina3.5文档/ISP调试文档/旧版Hawkview Tool使用说明书_v1.5.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_窗口系统开发指南.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_各平台多媒体格式支持列表.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_tplayer播放器开发和使用指南.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_AVS使用指南.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_Gstreamer使用文档.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_trecorder录制接口开发和使用指南.pdf
Tina3.5文档/基础模块说明文档/多媒体/TinaLinux_WEB开发指南.pdf
Tina3.5文档/基础模块说明文档/量产升级/TinaLinux_OTA开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_LEDC开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_GPU开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/Tina WIFI RF测试说明文档.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_LCD调试指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_存储管理开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_Camera开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_Security开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_bluetooth开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_wifi开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_Audio开发指南.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux GPIO IR驱动移植说明文档.pdf
Tina3.5文档/基础模块说明文档/外设/TinaLinux_Display开发指南.pdf
ARM claims that Thumb-2 instructions (for ARM Cortex cores and all ARMv7 processors) provides performance improvements and code size optimization:
https://en.wikipedia.org/wiki/ARM_Cortex-A7
Key features of the Cortex-A7 core are:
Partial dual-issue, in-order microarchitecture with an 8-stage pipeline[3]
NEON SIMD instruction set extension
VFPv4 Floating Point Unit
Thumb-2 instruction set encoding
Jazelle RCT
Hardware virtualization
Large Page Address Extensions (LPAE)
Integrated level 2 Cache (0–1 MB)
1.9 DMIPS / MHz[3]
Typical Clock Speed 1.5 GHz[3]
看来 A7 应该是支持thumb-2指令集的.
孤星泪 说:奇怪,我的荔枝派跑起来其它功能都正常,但是屏幕背光没有显示。
我的也是没有背光, 这就尴尬了, 看代码好像是 dts 驱动pwm0 (PB4) 实现的, 荔枝派的原理图也是这么接, 可是就是不亮.
修改这个文件: drivers/video/sunxi/sunxi_lcd.c
static void sunxi_lcdc_config_pinmux(void)
{
#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I_V3S) || defined(CONFIG_MACH_SUN8I_S3)
int pin;
#if defined(CONFIG_MACH_SUN8I_V3S)
#define SUN8I_V3S_GPE_LCD 3
for (pin = SUNXI_GPE(0); pin <= SUNXI_GPE(24); pin++) {
if (pin >= SUNXI_GPE(20) && pin <= SUNXI_GPE(22))
continue; /* These pins are not LCD */
sunxi_gpio_set_cfgpin(pin, SUN8I_V3S_GPE_LCD);
}
printf("init v3s gpio e for lcd\n");
#elif defined(CONFIG_MACH_SUN8I_S3)
for (pin = SUNXI_GPD(0); pin <= SUNXI_GPD(21); pin++) {
sunxi_gpio_set_cfgpin(pin, SUNXI_GPD_LCD0);
sunxi_gpio_set_drv(pin, 3);
}
printf("init s3 gpio e for lcd\n");
#endif
#endif
}
然后命令行运行:
fatload usb 0:1 0x43000000 800x480.bmp;bmp display 0x43000000 0 0
屏幕有反应了, 但是显示还不正常.
/*
* Wait up to 1s for value to be set in given part of reg.
*/
void mctl_await_completion(u32 *reg, u32 mask, u32 val)
{
unsigned long tmo = timer_get_us() + 1000000;
while ((readl(reg) & mask) != val) {
if (timer_get_us() > tmo)
panic("Timeout initialising DRAM\n");
}
}
或者把 1000000 改大一点试一试, 或许是DRAM片子差异导致初始化速度不一致?
https://developer.ridgerun.com/wiki/index.php/How_to_use_GPIO_signals
https://developer.ridgerun.com/wiki/index.php?title=Gpio-int-test.c
Gpio-int-test.c:
/* Copyright (c) 2011, RidgeRun
* All rights reserved.
*
* Contributors include:
* Todd Fischer
* Brad Lu
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the RidgeRun.
* 4. Neither the name of the RidgeRun nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY RIDGERUN ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL RIDGERUN BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
/****************************************************************
* Constants
****************************************************************/
#define SYSFS_GPIO_DIR "/sys/class/gpio"
#define POLL_TIMEOUT (3 * 1000) /* 3 seconds */
#define MAX_BUF 64
/****************************************************************
* gpio_export
****************************************************************/
int gpio_export(unsigned int gpio)
{
int fd, len;
char buf[MAX_BUF];
fd = open(SYSFS_GPIO_DIR "/export", O_WRONLY);
if (fd < 0) {
perror("gpio/export");
return fd;
}
len = snprintf(buf, sizeof(buf), "%d", gpio);
write(fd, buf, len);
close(fd);
return 0;
}
/****************************************************************
* gpio_unexport
****************************************************************/
int gpio_unexport(unsigned int gpio)
{
int fd, len;
char buf[MAX_BUF];
fd = open(SYSFS_GPIO_DIR "/unexport", O_WRONLY);
if (fd < 0) {
perror("gpio/export");
return fd;
}
len = snprintf(buf, sizeof(buf), "%d", gpio);
write(fd, buf, len);
close(fd);
return 0;
}
/****************************************************************
* gpio_set_dir
****************************************************************/
int gpio_set_dir(unsigned int gpio, unsigned int out_flag)
{
int fd, len;
char buf[MAX_BUF];
len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/direction", gpio);
fd = open(buf, O_WRONLY);
if (fd < 0) {
perror("gpio/direction");
return fd;
}
if (out_flag)
write(fd, "out", 4);
else
write(fd, "in", 3);
close(fd);
return 0;
}
/****************************************************************
* gpio_set_value
****************************************************************/
int gpio_set_value(unsigned int gpio, unsigned int value)
{
int fd, len;
char buf[MAX_BUF];
len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio);
fd = open(buf, O_WRONLY);
if (fd < 0) {
perror("gpio/set-value");
return fd;
}
if (value)
write(fd, "1", 2);
else
write(fd, "0", 2);
close(fd);
return 0;
}
/****************************************************************
* gpio_get_value
****************************************************************/
int gpio_get_value(unsigned int gpio, unsigned int *value)
{
int fd, len;
char buf[MAX_BUF];
char ch;
len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio);
fd = open(buf, O_RDONLY);
if (fd < 0) {
perror("gpio/get-value");
return fd;
}
read(fd, &ch, 1);
if (ch != '0') {
*value = 1;
} else {
*value = 0;
}
close(fd);
return 0;
}
/****************************************************************
* gpio_set_edge
****************************************************************/
int gpio_set_edge(unsigned int gpio, char *edge)
{
int fd, len;
char buf[MAX_BUF];
len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/edge", gpio);
fd = open(buf, O_WRONLY);
if (fd < 0) {
perror("gpio/set-edge");
return fd;
}
write(fd, edge, strlen(edge) + 1);
close(fd);
return 0;
}
/****************************************************************
* gpio_fd_open
****************************************************************/
int gpio_fd_open(unsigned int gpio)
{
int fd, len;
char buf[MAX_BUF];
len = snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio);
fd = open(buf, O_RDONLY | O_NONBLOCK );
if (fd < 0) {
perror("gpio/fd_open");
}
return fd;
}
/****************************************************************
* gpio_fd_close
****************************************************************/
int gpio_fd_close(int fd)
{
return close(fd);
}
/****************************************************************
* Main
****************************************************************/
int main(int argc, char **argv, char **envp)
{
struct pollfd fdset[2];
int nfds = 2;
int gpio_fd, timeout, rc;
char *buf[MAX_BUF];
unsigned int gpio;
int len;
if (argc < 2) {
printf("Usage: gpio-int <gpio-pin>\n\n");
printf("Waits for a change in the GPIO pin voltage level or input on stdin\n");
exit(-1);
}
gpio = atoi(argv[1]);
gpio_export(gpio);
gpio_set_dir(gpio, 0);
gpio_set_edge(gpio, "rising");
gpio_fd = gpio_fd_open(gpio);
timeout = POLL_TIMEOUT;
while (1) {
memset((void*)fdset, 0, sizeof(fdset));
fdset[0].fd = STDIN_FILENO;
fdset[0].events = POLLIN;
fdset[1].fd = gpio_fd;
fdset[1].events = POLLPRI;
rc = poll(fdset, nfds, timeout);
if (rc < 0) {
printf("\npoll() failed!\n");
return -1;
}
if (rc == 0) {
printf(".");
}
if (fdset[1].revents & POLLPRI) {
lseek(fdset[1].fd, 0, SEEK_SET);
len = read(fdset[1].fd, buf, MAX_BUF);
printf("\npoll() GPIO %d interrupt occurred\n", gpio);
}
if (fdset[0].revents & POLLIN) {
(void)read(fdset[0].fd, buf, 1);
printf("\npoll() stdin read 0x%2.2X\n", (unsigned int) buf[0]);
}
fflush(stdout);
}
gpio_fd_close(gpio_fd);
return 0;
}
https://whycan.cn/files/members/3/QQ20170920170709.png
基本搞定
暂不处理一台电脑连接多个 JLink的情况.
Qt源码本站下载: NUC972_JLink_BurnLinux.7z
这操作着实有点骚!
https://github.com/jaredtao/FFmpegDemo
https://github.com/jaredtao/QtOpenGL#赞助
https://jaredtao.github.io/2019/06/22/玩转Qml(15)-着色器效果ShaderEffect/
作者 武威的涛哥
博客 https://jaredtao.github.io/
博客-gitee镜像 https://jaredtao.gitee.io
知乎专栏 https://zhuanlan.zhihu.com/TaoQt
QQ群 734623697(高质量群,大佬多、不灌水)
邮箱 jared2020@163.com
微信 xsd2410421
QQ、TIM 759378563
各位F1C100s有研究过怎样加密吗??
http://whycan.com/t_3118.html#p26369
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)
https://github.com/aodzip/libcedarc
这个应该是来源:
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia/libcedarc
这里有调用demo:
https://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimediahttps://github.com/EmperG/lindenis-v536-package/tree/master/allwinner/tina_multimedia_demo
https://github.com/king0769/Zeta_Linux_Samples/blob/master/demo_DecodingH264Frame/main.cpp
@raspberryman
https://github.com/tpetazzoni/buildroot/commit/61a5dd332968286a4abe9b1ec0302cf3d334910d
board/stmicroelectronics/stm32mp157-dk/overlay/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.42.2
netmask 255.255.255.0
很多板子都是确实是这样配置的。
今天确定了两件事:F1C100S的CPU频率和DRAM频率设置
http://whycan.com/t_3380.html
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)
vultr 说:是呀, gitee限制单个账户仓库总大小5G, coding 限制单个仓库2G, 自己花几十块一年搭一个算了,还能干其他事情。
说干就干, 我已经搞定了.
按这个帖子操作一遍就好了, https://yq.aliyun.com/articles/358941
1. 先ssh登陆到腾讯云的88元/年服务器, 以裸库的形式拷贝 linux.git
2. 配置 ssh 秘钥
3. 从服务器克隆项目:
git clone code.me.wang:/home/git/repo/linux.git
缺了一步 adduser git
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
return app.exec();
}
这是论坛大佬发给我的C++ QML代码, 我直接运行是可以的,
所以QML推测不需要eglfs/gpu驱动: A33_qml.rar
然后根据错误提示搜索到的答案: https://github.com/therecipe/qt/issues/775
请问V3s这种没有GPU的芯片可以跑QML吗?
我在V3s用PyQt5跑这个 QML 程序出错 https://zgljl2012.com/pyqt5-qml-18xing-dai-ma-shi-xian-hello-worldru-men/
#python3 test.py -platform qvnc
qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc.
Aborted
dd if=fel-sdboot.sunxi of=fel-sdboot.img bs=1024 seek=8
然后用 win32diskimager 烧录 fel-sdboot.img 就可以了.
插入SD0然后上电, 强制进入USB烧录模式。
本站下载: fel-sdboot.zip
也发一个荔枝派zero 全志V3s 32M spi flash 固件,800x480 LCD, 开机自动运行 Qt analogclock
http://whycan.cn/t_3400.html#p47841
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)
正在学习这个帖子, 准备做一个简易的 WIFI 4G路由器
通过echo命令行发送AT拨号命令:
echo 2c7c 6002 > /sys/bus/usb-serial/drivers/option1/new_id
echo -e "AT+QCFG=\"usbnet\",3\n\n" > /dev/ttyUSB1
echo -e "AT+qnetdevctl=1,1\n\n" > /dev/ttyUSB1
自动获取IP地址,
# udhcpc -i usb0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.43.100
udhcpc: lease of 192.168.43.100 obtained, lease time 86400
deleting routers
adding dns 192.168.43.1
# ping www.163.com
PING www.163.com (122.70.142.37): 56 data bytes
64 bytes from 122.70.142.37: seq=0 ttl=54 time=62.715 ms
64 bytes from 122.70.142.37: seq=1 ttl=54 time=116.957 ms
64 bytes from 122.70.142.37: seq=2 ttl=54 time=126.108 ms
64 bytes from 122.70.142.37: seq=3 ttl=54 time=76.104 ms
64 bytes from 122.70.142.37: seq=4 ttl=54 time=86.103 ms
64 bytes from 122.70.142.37: seq=5 ttl=54 time=76.104 ms
64 bytes from 122.70.142.37: seq=6 ttl=54 time=86.248 ms
64 bytes from 122.70.142.37: seq=7 ttl=54 time=76.230 ms
64 bytes from 122.70.142.37: seq=8 ttl=54 time=76.357 ms
然后就可以上网了.
# lsusb
Bus 001 Device 005: ID 2c7c:6002
...
#
# dmesg
[ 410.496186] usb 1-1.3: new high-speed USB device number 5 using ehci-platform
[ 410.752369] rndis_host 1-1.3:1.0 usb0: register 'rndis_host' at usb-1c1a000.usb-1.3, RNDIS device, 56:8b:c9:8b:ca:37
#
# echo 2c7c 6002 > /sys/bus/usb-serial/drivers/option1/new_id
[ 438.245239] option 1-1.3:1.2: GSM modem (1-port) converter detected
[ 438.255804] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[ 438.263604] option 1-1.3:1.3: GSM modem (1-port) converter detected
[ 438.274965] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[ 438.282845] option 1-1.3:1.4: GSM modem (1-port) converter detected
[ 438.293149] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
#
# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2
A64 驱动EC200s成功.
网上找到几行命令:
sudo modprobe option
sudo chmod 777 /sys/bus/usb-serial/drivers/option1/new_id
sudo echo 2c7c 6002 > /sys/bus/usb-serial/drivers/option1/new_id
终于搞定:
[404674.221604] usbcore: registered new interface driver option
[404674.223089] usbserial: USB Serial support registered for GSM modem (1-port)
[404727.747542] option 1-3:1.2: GSM modem (1-port) converter detected
[404727.754413] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
[404727.754493] option 1-3:1.3: GSM modem (1-port) converter detected
[404727.757533] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB1
[404727.757583] option 1-3:1.4: GSM modem (1-port) converter detected
[404727.770387] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB2
[404376.840754] usb 1-3: new high-speed USB device number 22 using ehci-pci
[404377.107138] usb 1-3: New USB device found, idVendor=2c7c, idProduct=6002, bcdDevice= 3.18
[404377.107140] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[404377.107142] usb 1-3: Product: Android
[404377.107143] usb 1-3: Manufacturer: Android
[404377.107144] usb 1-3: SerialNumber: 0000
[404377.128274] rndis_host 1-3:1.0 usb0: register 'rndis_host' at usb-0000:02:03.0-3, RNDIS device, 9e:5b:dd:bc:2c:28
[404377.236577] rndis_host 1-3:1.0 ens35u3: renamed from usb0
只有RNDSI, 并没有出现串口
root@vultr:/opt/buildroot-2020.02.3# ln -s board/widora/tiny200/widora_tiny200_defconfig config/
ln: target 'config/' is not a directory: No such file or directory
root@vultr:/opt/buildroot-2020.02.3# ls board/widora/tiny200/widora_tiny200_defconfig
board/widora/tiny200/widora_tiny200_defconfig
ln命令这样用会出错, 请问这行命令的用意是什么呢?
设置页面布局:
lv_page_set_scrl_layout(parent, LV_LAYOUT_PRETTY_TOP);
页面里面创建6个 lv_cont:
#define WIDTH_WATCH_VIEW 265
lv_obj_t* cont2 = lv_cont_create(parent, NULL);
lv_obj_set_width(cont2, WIDTH_WATCH_VIEW);
lv_obj_set_height(cont2, 200);
//lv_obj_set_pos(cont2, 245, 0);
lv_obj_t* cont3 = lv_cont_create(parent, NULL);
lv_obj_set_width(cont3, WIDTH_WATCH_VIEW);
lv_obj_set_height(cont3, 200);
//lv_obj_set_pos(cont3, 490, 0);
lv_obj_t* cont4 = lv_cont_create(parent, NULL);
lv_obj_set_width(cont4, WIDTH_WATCH_VIEW);
lv_obj_set_height(cont4, 200);
//lv_obj_set_pos(cont4, 0, 205);
lv_obj_t* cont5 = lv_cont_create(parent, NULL);
lv_obj_set_width(cont5, WIDTH_WATCH_VIEW);
lv_obj_set_height(cont5, 200);
lv_obj_t* cont6 = lv_cont_create(parent, NULL);
lv_obj_set_width(cont6, WIDTH_WATCH_VIEW);
lv_obj_set_height(cont6, 200);
lv_theme_material.c 这个代码
style_init_reset(&styles->tabview_page_scrl);
lv_style_set_pad_top(&styles->tabview_page_scrl, LV_STATE_DEFAULT, PAD_DEF);
lv_style_set_pad_bottom(&styles->tabview_page_scrl, LV_STATE_DEFAULT, PAD_DEF);
lv_style_set_pad_left(&styles->tabview_page_scrl, LV_STATE_DEFAULT, PAD_DEF);
lv_style_set_pad_right(&styles->tabview_page_scrl, LV_STATE_DEFAULT, PAD_DEF);
lv_style_set_pad_inner(&styles->tabview_page_scrl, LV_STATE_DEFAULT, PAD_DEF);
改为:
style_init_reset(&styles->tabview_page_scrl);
lv_style_set_pad_top(&styles->tabview_page_scrl, LV_STATE_DEFAULT, 1);
lv_style_set_pad_bottom(&styles->tabview_page_scrl, LV_STATE_DEFAULT, 1);
lv_style_set_pad_left(&styles->tabview_page_scrl, LV_STATE_DEFAULT, 1);
lv_style_set_pad_right(&styles->tabview_page_scrl, LV_STATE_DEFAULT, 1);
lv_style_set_pad_inner(&styles->tabview_page_scrl, LV_STATE_DEFAULT, 1);
用一堆垃圾代码, 设置控件宽度和绝对坐标, 终于初步实现效果了:
lv_disp_size_t disp_size = lv_disp_get_size_category(NULL);
lv_coord_t grid_w = lv_page_get_width_grid(parent, disp_size <= LV_DISP_SIZE_SMALL ? 1 : 2, 1);
lv_obj_t* cont1 = lv_cont_create(parent, NULL);
lv_cont_set_layout(cont1, LV_LAYOUT_OFF);
//lv_obj_add_style(cont1, LV_CONT_PART_MAIN, &style_box);
lv_obj_set_drag_parent(cont1, true);
//lv_obj_set_style_local_value_str(cont1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, "Basics");
//lv_cont_set_fit2(cont1, LV_FIT_NONE, LV_FIT_TIGHT);
lv_obj_set_width(cont1, grid_w);
lv_obj_set_height(cont1, 350);
lv_obj_t* label1 = lv_label_create(cont1, NULL);
lv_obj_t* label2 = lv_label_create(cont1, NULL);
lv_obj_t* label3 = lv_label_create(cont1, NULL);
lv_label_set_text(label1, "Name:");
lv_label_set_text(label2, "Age:");
lv_label_set_text(label3, "Address:");
//lv_obj_set_fit2(label1, LV_FIT_NONE, LV_FIT_TIGHT);
//lv_label_set_fit2(label2, LV_FIT_NONE, LV_FIT_TIGHT);
lv_obj_set_pos(label1, 50, 20);
lv_obj_set_pos(label2, 50, 60);
lv_obj_set_pos(label3, 50, 100);
lv_obj_set_width(label1, 144);
lv_obj_set_width(label2, 200);
lv_obj_set_width(label3, 200);
lv_obj_t * ta = lv_textarea_create(cont1, NULL);
//lv_cont_set_fit2(ta, LV_FIT_PARENT, LV_FIT_NONE);
lv_textarea_set_text(ta, "");
lv_textarea_set_placeholder_text(ta, "name");
lv_textarea_set_one_line(ta, true);
lv_textarea_set_cursor_hidden(ta, true);
//lv_obj_set_event_cb(ta, ta_event_cb);
lv_obj_set_pos(ta, 150, 10);
lv_obj_set_width(ta, 100);
lv_obj_t * ta2 = lv_textarea_create(cont1, NULL);
//lv_cont_set_fit2(ta, LV_FIT_PARENT, LV_FIT_NONE);
lv_textarea_set_text(ta2, "");
lv_textarea_set_placeholder_text(ta2, "age");
lv_textarea_set_one_line(ta2, true);
lv_textarea_set_cursor_hidden(ta2, true);
//lv_obj_set_event_cb(ta2, ta_event_cb);
lv_obj_set_pos(ta2, 150, 50);
lv_obj_set_width(ta2, 100);
#if 1
lv_obj_t * ta3 = lv_textarea_create(cont1, NULL);
//lv_cont_set_fit2(ta, LV_FIT_PARENT, LV_FIT_NONE);
lv_textarea_set_text(ta3, "");
lv_textarea_set_placeholder_text(ta3, "address");
lv_textarea_set_one_line(ta3, true);
lv_textarea_set_cursor_hidden(ta3, true);
//lv_obj_set_event_cb(ta2, ta_event_cb);
lv_obj_set_pos(ta3, 50, 130);
lv_obj_set_width(ta3, 200);
#endif