#### 使用ALSA
如果你更喜欢使用ALSA,可以使用多个混音器来组合不同的声道。首先,确认你的声卡设备名称,然后创建一个自定义的混音器文件来组合多个声道。
1. **编辑`/etc/asound.conf`**:
创建或编辑`/etc/asound.conf`文件,定义一个新的混音器设备,将多个声卡组合在一起。例如:
pcm.multichannel {
type multi
playback_switch {
slave {
pcm "hw:0,0"
}
slave {
pcm "hw:1,0"
}
slave {
pcm "hw:2,0"
}
}
}
在这里,`hw:0,0`、`hw:1,0` 和 `hw:2,0` 分别代表三张声卡的设备名称。你需要根据实际的设备名称进行替换。
2. **设置默认PCM设备**:
确保你的系统将新创建的混音器设备设置为默认PCM设备。
### 3. 测试和调整
完成配置后,测试音频输出是否正确。你可以播放一段5.1声道的音频文件,并检查每个扬声器是否输出正确的声道声音。
### 4. 自动化脚本
为了简化每次启动时的配置过程,可以编写一个脚本来自动加载所需的PulseAudio模块或ALSA配置,并设置默认音频设备。
### 注意事项
- 确保所有声卡都正确连接并且工作正常。
- 扬声器的布线和设置也非常重要,确保每个扬声器连接到正确的输出端口。
- 由于声道映射需要精确设置,可能需要多次调整才能达到理想的效果。
通过上述步骤,你可以利用三张双声道声卡在Linux系统中实现5.1声道环绕声。
idf5.3开始支持esp32p4,官网上也有这个开发板资料
这是学多年前长城哈佛的玩法吗?一个H6玩到底
# chmod +x /tmp/lvgl_sunxifb && /tmp/lvgl_sunxifb 0
wh=1200x1920, vwh=1200x3840, bpp=32, rotated=0
Turn on double buffering.
Turn on 2d hardware acceleration.
Turn on 2d hardware acceleration rotate.
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 0 1200 1920]]
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 1920 1200 1920]]
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 0 1200 1920]]
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 1920 1200 1920]]
其中用的json解析器: https://github.com/DaveGamble/cJSON
闲鱼捡漏,拆解一台收银机【多图警告,流量党劝退】
https://whycan.com/t_3424.html
fdt set /soc@03000000/lcd0@01c0c000/ lcd_x <1024>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_y <400>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_dclk_freq <35>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hbp <170>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_ht <1344>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hspw <20>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vbp <20>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vt <435>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vspw <5>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_x <1024>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_y <600>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_dclk_freq <52>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hbp <170>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_ht <1364>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hspw <10>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vbp <20>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vt <635>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vspw <5>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <linux/fb.h>
#define WIDTH 480
#define HEIGHT 480
#define BYTES_PER_PIXEL 4
int main() {
int fb = open("/dev/fb0", O_RDWR);
if (fb == -1) {
perror("Unable to open framebuffer");
return 1;
}
struct fb_var_screeninfo vinfo;
ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);
printf("vinfo.xres=%d, vinfo.yres=%d\n", vinfo.xres, vinfo.yres);
printf("vinfo.xres_virtual=%d, vinfo.yres_virtual=%d\n", vinfo.xres_virtual, vinfo.yres_virtual);
ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);
unsigned char *fbp = mmap(0, vinfo.yres_virtual * vinfo.xres * BYTES_PER_PIXEL, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0);
// 填充第一个缓冲区
for (int y = 0; y < vinfo.yres; y++)
for (int x = 0; x < vinfo.xres; x++)
*((unsigned long*)(fbp + 4*x + 4*y*vinfo.xres)) = 0xFF00FFFF;
// 填充第二个缓冲区
for (int y = vinfo.yres; y < 2*vinfo.yres; y++)
for (int x = 0; x < vinfo.xres; x++)
*((unsigned long*)(fbp + 4*x + 4*y*vinfo.xres)) = 0xFFFF00FF;
int i = 0;
while(1)
{
// 切换到第二个缓冲区
vinfo.yoffset = (i++%2)*HEIGHT;
printf("vinfo.yoffset = %d\n", vinfo.yoffset);
if(0 != ioctl(fb, FBIOPAN_DISPLAY, &vinfo))
{
printf("fb iopan display error.\n");
}
sleep(1);
}
munmap(fbp, vinfo.yres_virtual * vinfo.xres * BYTES_PER_PIXEL);
close(fb);
return 0;
}
=> fdt list /soc@03000000/pinctrl@02000000/gmac0@0/
gmac0@0 {
allwinner,pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15";
allwinner,function = "rgmii";
allwinner,drive = "0";
allwinner,muxsel = <0x00000003>;
allwinner,pull = <0x00000000>;
linux,phandle = <0x00000097>;
phandle = <0x00000097>;
};
=>
=>
=>
=> fdt set /soc@03000000/pinctrl@02000000/gmac0@0/ allwinner,drive 3
=>
=>
=> fdt list /soc@03000000/pinctrl@02000000/gmac0@0/
gmac0@0 {
allwinner,pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15";
allwinner,function = "rgmii";
allwinner,drive = "3";
allwinner,muxsel = <0x00000003>;
allwinner,pull = <0x00000000>;
linux,phandle = <0x00000097>;
phandle = <0x00000097>;
};
=>
https://www.cnblogs.com/hylife/p/17340965.html
全志Uboot fdt修改DTS进行临时调试的方法
https://bbs.16rd.com/thread-587397-1-1.html
全志怎么没出RK这种测试工具呢?
root@OpenWrt:/#
root@OpenWrt:/# reboot
root@OpenWrt:/# [ 131.812780] br-lan: port 1(eth0) entered disabled state
[ 131.825385] device eth0 left promiscuous mode
[ 131.830628] br-lan: port 1(eth0) entered disabled state
[ 131.846463] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 136.189181] sunxi-mmc sdc2: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 136.200895] [alarmtimer] have no shutdown alarm! alarmtimer_shutdown 322
[ 137.161378] reboot: Restarting system
make package/feeds/packages/canutils/compile V=s
make[1]: Entering directory '/opt2/openwrt/openwrt_v3s_can_gateway'
make[2]: Entering directory '/opt2/openwrt/openwrt_v3s_can_gateway/package/libs/toolchain'
echo "libc" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
echo "libgcc" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
echo "libpthread" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
echo "librt" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
make[2]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway/package/libs/toolchain'
time: package/libs/toolchain/compile#0.12#0.04#0.16
make[2]: Entering directory '/opt2/openwrt/openwrt_v3s_can_gateway/feeds/packages/utils/canutils'
mkdir -p /opt2/openwrt/openwrt_v3s_can_gateway/dl
SHELL= flock /opt2/openwrt/openwrt_v3s_can_gateway/tmp/.canutils-2017-02-16-cb33a557.tar.xz.flock -c ' /opt2/openwrt/openwrt_v3s_can_gateway/scripts/download.pl "/opt2/openwrt/openwrt_v3s_can_gateway/dl" "canutils-2017-02-16-cb33a557.tar.xz" "d9c01eeff3d81a28161ca5c3937ec005a1f49ca3eb97bee0164d53cc66365786" "" || ( /opt2/openwrt/openwrt_v3s_can_gateway/scripts/dl_github_archive.py --dl-dir="/opt2/openwrt/openwrt_v3s_can_gateway/dl" --url="https://github.com/linux-can/can-utils" --version="cb33a55720716cbe01e6025a2bda74a1b7e492d3" --subdir="canutils-2017-02-16-cb33a557" --source="canutils-2017-02-16-cb33a557.tar.xz" --hash="d9c01eeff3d81a28161ca5c3937ec005a1f49ca3eb97bee0164d53cc66365786" || ( echo "Checking out files from the git repository..."; mkdir -p /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl && cd /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl && rm -rf canutils-2017-02-16-cb33a557 && [ \! -d canutils-2017-02-16-cb33a557 ] && git clone https://github.com/linux-can/can-utils canutils-2017-02-16-cb33a557 && (cd canutils-2017-02-16-cb33a557 && git checkout cb33a55720716cbe01e6025a2bda74a1b7e492d3 && git submodule update --init --recursive) && echo "Packing checkout..." && export TAR_TIMESTAMP=`cd canutils-2017-02-16-cb33a557 && git log -1 --format='\''@%ct'\''` && rm -rf canutils-2017-02-16-cb33a557/.git && tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c canutils-2017-02-16-cb33a557 | xz -zc -7e > /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl/canutils-2017-02-16-cb33a557.tar.xz && mv /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl/canutils-2017-02-16-cb33a557.tar.xz /opt2/openwrt/openwrt_v3s_can_gateway/dl/ && rm -rf canutils-2017-02-16-cb33a557; ); ) '
echo "canutils" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/canutils.default.install
echo "canutils-candump" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/canutils.default.install
echo "canutils-cansend" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/canutils.default.install
make[2]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway/feeds/packages/utils/canutils'
time: package/feeds/packages/canutils/compile#0.95#0.49#1.42
make[1]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway'
这个正常
Configuring luci.
Configuring luci-i18n-opkg-zh-cn.
Configuring procps-ng-top.
Configuring luci-i18n-opkg-en.
Configuring luci-i18n-base-en.
Configuring procps-ng-pmap.
Configuring kmod-ipt-offload.
Configuring urngd.
Configuring procps-ng-pgrep.
Configuring luci-i18n-firewall-zh-cn.
Configuring ppp-mod-pppoe.
Configuring canutils-candump.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for ip-full:
* libcap
* opkg_install_cmd: Cannot install package ip-full.
package/Makefile:65: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway'
package/Makefile:108: recipe for target '/opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install' failed
make[1]: *** [/opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2
make[1]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway'
/opt2/openwrt/openwrt_v3s_can_gateway/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2[/b]
[b]real 6m44.278s
user 5m32.328s
sys 1m35.930s
#
咦,编译错误了
这个aic8800 的wlan0 没法加入br0
# brctl addif br0 wlan0
can't add wlan0 to bridge br0: Operation not supported
查了一下
这个错误可能是由于你尝试将一个无线接口(wlan0)添加到网桥,但是许多无线设备并不支持这种操作。这是由于802.11 WiFi规定的限制和驱动程序实现的问题。
一种可能的解决方案是将无线接口设置为四层(IP层)而非二层(以太网层)的转发模式。你可以使用Linux的网络地址转换(NAT)功能或者IP路由来实现这个目标。例如,你可以使用iptables和netfilter来配置NAT和防火墙规则,从而允许通过wlan0接收到的数据包在eth0和其他接口之间转发。
另外一个方法是使用第三方工具,如hostapd,它可以将无线网卡设置为AP模式(如果硬件支持),然后创建一个虚拟的有线接口,并将该接口加入到网桥。
需要注意的是,具体的解决方案取决于你的具体需求和环境,包括你的硬件、驱动程序、网络环境和安全需求等因素。
感觉可能是驱动问题。
之前是电子工程师,现在失业送外卖,不过送外卖也没单。没外挂只能吃西北风了
楼主是搞笑的吗?
试一试这个方案:
投屏软件scrcpy在Linux上的移植(porting scrcpy to linux)
https://whycan.com/t_2736.html#p22190
哇酷小二 说:都不是的话,试一试这个:
成功了,还可以鼠标控制,太牛了https://whycan.com/files/members/5129/微信截图_20230917192134.png
6666
分享一下怎么弄出来的
#include "lvgl/lvgl.h"
#define DOUBLE_CLICK_TIME_MS 300 // 双击事件的最大时间间隔(毫秒)
static uint32_t last_click_time = 0;
static void btn_event_cb(lv_obj_t * obj, lv_event_t event)
{
if (event == LV_EVENT_SHORT_CLICKED) {
uint32_t now = lv_tick_get();
if ((now - last_click_time) < DOUBLE_CLICK_TIME_MS) {
printf("Double click!\n");
last_click_time = 0;
}
else {
printf("Single click.\n");
last_click_time = now;
}
}
}
int main(void)
{
lv_init();
// 创建一个按钮控件
lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL);
// 设置按钮的单击事件回调函数
lv_obj_set_event_cb(btn, btn_event_cb);
while(1) {
lv_task_handler(); // 处理 LVGL 任务
}
return 0;
}
在上面的示例中,当按钮被单击时,btn_event_cb() 回调函数会被触发,并检查两次事件之间的时间间隔。如果小于固定时间间隔,则输出 "Double click!",否则输出 "Single click."。
请注意,本示例代码使用了 lv_tick_get() 函数来获取当前系统时间,该函数需要您配置并启用 LVGL 的计时器(在 lv_conf.h 中进行配置)。另外,您可以通过修改 DOUBLE_CLICK_TIME_MS 宏来自定义双击事件的时间间隔。
static void drag_event_handler(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
lv_indev_t * indev = lv_indev_get_act();
lv_point_t vect;
lv_indev_get_vect(indev, &vect);
lv_coord_t x = lv_obj_get_x(obj) + vect.x;
lv_coord_t y = lv_obj_get_y(obj) + vect.y;
lv_obj_set_pos(obj, x, y);
}
/**
* Make an object dragable.
*/
void lv_example_obj_2(void)
{
lv_obj_t * obj;
obj = lv_obj_create(lv_scr_act());
lv_obj_set_size(obj, 150, 100);
lv_obj_add_event_cb(obj, drag_event_handler, LV_EVENT_PRESSING, NULL);
lv_obj_t * label = lv_label_create(obj);
lv_label_set_text(label, "Drag me");
lv_obj_center(label);
}
拖拽屏幕上面的控件
Download new driver file m25p80.c
diff the origin m25p80.c and my m25p80.c
64,66d63
< /* Used for Winbond flashes only. */
< #define OPCODE_WINBOND_ID 0x4b /* Get flash unique id */
<
1001,1016d997
< /* flash unique id probe */
< static int unique_id_prob(struct spi_device *spi, u8 *id)
< {
< int tmp;
< u8 code[5];
<
< code[0] = OPCODE_WINBOND_ID;
< tmp = spi_write_then_read(spi, &code, 5, id, 8);
< if (tmp < 0) {
< pr_debug("%s: error %d reading UNIQUE ID\n",
< dev_name(&spi->dev), tmp);
< return tmp;
< }
< return 0;
< }
<
1125,1136d1105
< /* show unique id in kernel debug log for w25q64 or w25q128. */
< if(info->jedec_id == 0xef4017 || info->jedec_id == 0xef4018) {
< u8 unique_id[8];
< if(!unique_id_prob(spi, unique_id)) {
< dev_warn(&spi->dev, "flash id: %02x%02x%02x%02x%02x%02x%02x%02x\n",
< unique_id[7], unique_id[6], unique_id[5], unique_id[4],
< unique_id[3], unique_id[2], unique_id[1], unique_id[0]);
< } else {
< dev_warn(&spi->dev, "failed to get flash unique id.\n");
< }
< }
<
else if(code == LV_EVENT_PRESSED) {
colorwheel->last_change_time = lv_tick_get();
lv_indev_get_point(lv_indev_get_act(), &colorwheel->last_press_point);
res = double_click_reset(obj);
if(res != LV_RES_OK) return;
}
else if(code == LV_EVENT_PRESSING) {
lv_indev_t * indev = lv_indev_get_act();
if(indev == NULL) return;
lv_indev_type_t indev_type = lv_indev_get_type(indev);
lv_point_t p;
if(indev_type == LV_INDEV_TYPE_ENCODER || indev_type == LV_INDEV_TYPE_KEYPAD) {
p.x = obj->coords.x1 + lv_obj_get_width(obj) / 2;
p.y = obj->coords.y1 + lv_obj_get_height(obj) / 2;
}
else {
lv_indev_get_point(indev, &p);
}
lv_coord_t drag_limit = indev->driver->scroll_limit;
if((LV_ABS(p.x - colorwheel->last_press_point.x) > drag_limit) ||
(LV_ABS(p.y - colorwheel->last_press_point.y) > drag_limit)) {
colorwheel->last_change_time = lv_tick_get();
colorwheel->last_press_point.x = p.x;
colorwheel->last_press_point.y = p.y;
}
p.x -= obj->coords.x1;
p.y -= obj->coords.y1;
/*Ignore pressing in the inner area*/
uint16_t w = lv_obj_get_width(obj);
int16_t angle = 0;
lv_coord_t cir_w = lv_obj_get_style_arc_width(obj, LV_PART_MAIN);
LVGL双击实现 double click
lv_obj_t* slider1;
lv_obj_t *label1, *label2;
void button_event_cb(lv_event_t* e)
{
lv_slider_set_value(slider1, 100, LV_ANIM_OFF);
}
void slider_event_cb(lv_event_t* e)
{
int32_t value = lv_slider_get_value(slider1);
char valueStr[32];
value = lv_slider_get_left_value(slider1);
snprintf(valueStr, sizeof(valueStr), "%d", value);
lv_label_set_text(label1, (valueStr));
value = lv_slider_get_value(slider1);
snprintf(valueStr, sizeof(valueStr), "%d", value);
lv_label_set_text(label2, (valueStr));
}
void lv_demo_test2()
{
slider1 = lv_slider_create(lv_scr_act());
lv_obj_center(slider1);
lv_slider_set_range(slider1, -255, 255);
lv_slider_set_mode(slider1, LV_SLIDER_MODE_RANGE);
lv_obj_add_event_cb(slider1, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
label1 = lv_label_create(lv_scr_act());
label2 = lv_label_create(lv_scr_act());
lv_obj_align_to(label1, slider1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
lv_obj_align_to(label2, slider1, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 10);
lv_slider_set_left_value(slider1, -100, LV_ANIM_OFF);
lv_slider_set_value(slider1, 100, LV_ANIM_OFF);
lv_obj_set_size(slider1, 20, 200);
lv_obj_t* button1 = lv_btn_create(lv_scr_act());
lv_obj_t* label3 = lv_label_create(button1);
lv_label_set_text(label3, "Test");
lv_obj_add_event_cb(button1, button_event_cb, LV_EVENT_CLICKED, NULL);
lv_obj_align_to(button1, slider1, LV_ALIGN_OUT_BOTTOM_MID, 0, 30);
}
lv_obj_t* slider1;
lv_obj_t *label1, *label2;
void slider_event_cb(lv_event_t* e)
{
int32_t value = lv_slider_get_value(slider1);
char valueStr[32];
value = lv_slider_get_left_value(slider1);
snprintf(valueStr, sizeof(valueStr), "%d", value);
lv_label_set_text(label1, (valueStr));
value = lv_slider_get_value(slider1);
snprintf(valueStr, sizeof(valueStr), "%d", value);
lv_label_set_text(label2, (valueStr));
}
void lv_demo_test2()
{
slider1 = lv_slider_create(lv_scr_act());
lv_obj_center(slider1);
lv_slider_set_range(slider1, -255, 255);
lv_slider_set_mode(slider1, LV_SLIDER_MODE_RANGE);
lv_obj_add_event_cb(slider1, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
label1 = lv_label_create(lv_scr_act());
label2 = lv_label_create(lv_scr_act());
lv_obj_align_to(label1, slider1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
lv_obj_align_to(label2, slider1, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 10);
}
static lv_indev_drv_t pointer_driver;
lv_indev_drv_init(&pointer_driver);
pointer_driver.type = LV_INDEV_TYPE_POINTER;
pointer_driver.read_cb = lv_win32_pointer_driver_read_callback;
pointer_driver.feedback_cb = btn_feedback_event_cb;
lv_win32_pointer_device_object = lv_indev_drv_register(&pointer_driver);
void btn_feedback_event_cb(lv_indev_drv_t* indev_drv, lv_event_code_t event)
{
printf("btn_feedback_event_cb\n");
switch (event)
{
case LV_EVENT_PRESSED:
printf("Pressed\n");
break;
case LV_EVENT_SHORT_CLICKED:
printf("Short clicked\n");
break;
case LV_EVENT_CLICKED:
printf("Clicked\n");
break;
case LV_EVENT_LONG_PRESSED:
printf("Long press\n");
break;
case LV_EVENT_LONG_PRESSED_REPEAT:
printf("Long press repeat\n");
break;
case LV_EVENT_RELEASED:
printf("Released\n");
break;
default:
printf("nothing\n");
break;
}
}
1个G的片上内存!也是人才啊,,,话说这个芯片在网上怎么找不到相关的资料?是最新出的吗?
SW106 手册: SW106_Datasheet V1.0.pdf
#define CAN0 0x02504000
#define CAN1 0x02504400
#define CAN_OFFSET(can_base,offset) (*((volatile uint32_t *)(can_base + (offset))))
#define CAN_MSEL(can_base) CAN_OFFSET(can_base,0x0000) //CAN mode select register
#define CAN_CMD(can_base) CAN_OFFSET(can_base,0x0004) //CAN command register
#define CAN_STA(can_base) CAN_OFFSET(can_base,0x0008) //CAN status register
#define CAN_INT(can_base) CAN_OFFSET(can_base,0x000C) //CAN interrupt register
#define CAN_INTEN(can_base) CAN_OFFSET(can_base,0x0010) //CAN interrupt enable register
#define CAN_BUSTIME(can_base) CAN_OFFSET(can_base,0x0014) //CAN bus timing register
#define CAN_TEWL(can_base) CAN_OFFSET(can_base,0x0018) //CAN TX error warning limit register
#define CAN_ERRC(can_base) CAN_OFFSET(can_base,0x001c) //CAN error counter register
#define CAN_RMCNT(can_base) CAN_OFFSET(can_base,0x0020) //CAN receive message counter register
#define CAN_RBUF_SADDR(can_base) CAN_OFFSET(can_base,0x0024) //CAN receive buffer start address register
#define CAN_TRBUF0(can_base) CAN_OFFSET(can_base,0x0040) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF1(can_base) CAN_OFFSET(can_base,0x0044) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF2(can_base) CAN_OFFSET(can_base,0x0048) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF3(can_base) CAN_OFFSET(can_base,0x004c) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF4(can_base) CAN_OFFSET(can_base,0x0050) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF5(can_base) CAN_OFFSET(can_base,0x0054) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF6(can_base) CAN_OFFSET(can_base,0x0058) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF7(can_base) CAN_OFFSET(can_base,0x005c) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF8(can_base) CAN_OFFSET(can_base,0x0060) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF9(can_base) CAN_OFFSET(can_base,0x0064) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF10(can_base) CAN_OFFSET(can_base,0x0068) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF11(can_base) CAN_OFFSET(can_base,0x006c) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF12(can_base) CAN_OFFSET(can_base,0x0070) //CAN TX/RX message buffer 0 register
#define CAN_ACPC(can_base) CAN_OFFSET(can_base,0x0028) //CAN acceptance code 0 register(reset mode)
#define CAN_ACPM(can_base) CAN_OFFSET(can_base,0x002C) //CAN acceptance mask 0 register(reset mode)
#define CAN_RBUF_RBACK(can_base) CAN_OFFSET(can_base,0x0180) //~0x1b0 //CAN transmit buffer for read back register
#define CAN_VERSION(can_base) CAN_OFFSET(can_base,0x0300) //CAN Version Register
typedef struct _t113_can_control_t_
{
volatile uint32_t * can_clk_gate;
uint32_t can_base;
uint32_t int_id;
}t113_can_control_t;
t113_can_control_t t113_can[2] =
{
{
(volatile uint32_t *)0x0200192C,
0x02504000,
53
},
{
(volatile uint32_t *)0x0200192C,
0x02504400,
54
}
};
uint32_t rxd_buf[13];
void t113_can_irq_handle(void* p)
{
uint32_t can_base = (uint32_t) p;
uint32_t int_sta = CAN_INT(can_base);
if(int_sta & 1)
{
/* 接收中断 */
can_read_data(can_base,rxd_buf);
/* 后续处理 */
}
if(int_sta & 2 )
{
/*发送中断*/
}
if(int_sta & 0xFC )
{
/* 错 误 中断 */
}
CAN_INT(can_base) = int_sta;
}
void ini_can(int can_id)
{
if(can_id > 1) return;
GPIOB->CFG0 &= ~(0xff00 << (can_id * 8));
GPIOB->CFG0 |= (0x8800 << (can_id * 8));
GPIOB->DRV0 |= (0x3300 << (can_id * 8));
t113_can_control_t * can_info = &t113_can[can_id];
uint32_t can_base = can_info->can_base;
int can_int_id = can_info->int_id;
*can_info->can_clk_gate |= (1 << (16 + can_id)) | (1 << can_id);/* CCU_CAN_BGR */
CAN_MSEL(can_base) |= 1; /* Reset mode selected*/
/* 500KHz CAN速率 */
CAN_BUSTIME(can_base) = (9 /* apb_clk = 100Mz , 100/10 = 10MHz*/
| (1 << 14) /* Synchronization Jump Width :2 Tq clock cycles */
| (13 << 16) /*Phase Segment 1 : 14 Tq clock cycles */
| ( 3 << 20) /*Phase Segment 2 : 4 Tq clock cycles */
| ( 0 << 23)); /* Bus line is sampled three times at the sample point */
CAN_ACPC(can_base) = 0xffffffff; /*实际使用时根据需要设置滤波*/
CAN_ACPM(can_base) = 0xffffffff; /*实际使用时根据需要设置滤波*/
CAN_MSEL(can_base) &= (~1);
// CAN_MSEL(can_base) |= (1 << 2); /* Loopback Mode */
CAN_MSEL(can_base) |= (1 << 3);/* Single Filter */
bsp_int_vect_set(can_int_id, /* Assign ISR handler. */
1u, /* 中断的优先级 */
1u, /* 中断的目标CPU */
(void *)can_base, /* 参数 */
t113_can_irq_handle);
irq_enable(can_int_id);//
/* 使能中断 */
CAN_INTEN(can_base) = 0x0FF;
}
void can_send_data(uint32_t can_base,uint8_t * buf,int len)
{
CAN_CMD(can_base) |= (1 << 2);
CAN_MSEL(can_base) &= (~1);
int retry = 1000;
do{
if(--retry == 0) break;
}while(!(CAN_STA(can_base) & (1 << 2)));
if(retry == 0) return;//
uint32_t * des = &CAN_TRBUF0(can_base);
for(int i = 0; i < len; i++)
des[i] = buf[i];
//CAN_CMD(can_base) = (1 << 4);
CAN_CMD(can_base) |= (1 << 0);
}
void can_read_data(uint32_t can_base,uint8_t * buf)
{
uint32_t * src = &CAN_TRBUF0(can_base);
for(int i = 0; i < 13; i++)
buf[i] = (char)src[i];
CAN_CMD(can_base) |= (1 << 2);
}
uint8_t can_teat_data[13] =
{
8,
0,
0x80,
0x55, /* SFF - TX data byte 1 / EFF- ID[12:5] */
0x55, /* SFF-TX data byte2[7:3] / EFF-ID[4:0]
SFF-TX data byte2[2:0] */
0x55, /* SFF-TX data byte 3 / EFF-TX data byte 1 */
0x55, /* SDATA4_EDATA2 SFF-TX data byte 4 / EFF-TX data byte 2 */
0x55, /* SDATA5_EDATA3 SFF-TX data byte 5 / EFF-TX data byte 3 */
0x55,/* SDATA5_EDATA4 SFF-TX data byte 6 / EFF-TX data byte 4 */
0x55,/* SDATA5_EDATA5 SFF-TX data byte 7 / EFF-TX data byte 5 */
0x55,/* SDATA5_EDATA6 SFF-TX data byte 8 / EFF-TX data byte 6 */
0x55, /* SDATA5_EDATA7 */
0x55 /* SDATA5_EDATA8 */
};
/* can_id: is 0 or 1 */
void t113_can_test(void)
{
ini_can(0);
ini_can(1);
while(1)
{
can_send_data(CAN0,can_data);
ms_delay(500);
can_send_data(CAN1,can_data);
ms_delay(500);
}
}
转载地址:
T113-S3 CAN模块使用的全部信息
https://bbs.aw-ol.com/topic/1383
cube 说:楼主优秀,可以直接用 V3x的PWM驱动电机吗?可以不用RP2040单片机吗?
可以驱动,但是2040是跑klipper固件的,开源3d打印机固件。
用上位机跑不太好,毕竟不是实时
瞄了一下代码,貌似可以直驱: https://github.com/Klipper3d/klipper/tree/master/src/linux
root@TinaLinux:/# rtk_hciattach -n -s 115200 ttyS1 rtk_h5
Realtek Bluetooth :Realtek Bluetooth init uart with init speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 3.1
Realtek Bluetooth :Use epoll
Realtek Bluetooth :[SYNC] Get SYNC Resp Pkt
Realtek Bluetooth :[CONFIG] Get SYNC pkt
Realtek Bluetooth :[CONFIG] Get CONFG pkt
Realtek Bluetooth :[CONFIG] Get CONFG resp pkt
Realtek Bluetooth :dic is 1, cfg field 0x14
Realtek Bluetooth :H5 init finished
Realtek Bluetooth :Realtek H5 IC
Realtek Bluetooth :Receive cmd complete event of command: 1001
Realtek Bluetooth :HCI Version 0x08
Realtek Bluetooth :HCI Revision 0x000d
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :Receive cmd complete event of command: fc6d
Realtek Bluetooth :Read ROM version 02
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 2
Realtek Bluetooth :IC: RTL8723DS
Realtek Bluetooth :Firmware/config: rtl8723d_fw, rtl8723d_config
Realtek Bluetooth :Couldnt open extra config /opt/rtk_btconfig.txt, No such file or directory
Realtek Bluetooth :Couldnt access customer BT MAC file /opt/bdaddr
Realtek Bluetooth :Origin cfg len 48
Realtek Bluetooth :55 ab 23 87 2a 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b d9 00 01 0f e4 00 01
Realtek Bluetooth :08 f3 00 01 0c f4 00 08 01 00 01 90 00 00 09 04
Realtek Bluetooth :Config baudrate: 04928002
Realtek Bluetooth :uart flow ctrl: 1
Realtek Bluetooth :Vendor baud from Config file: 04928002
Realtek Bluetooth :New cfg len 48
Realtek Bluetooth :55 ab 23 87 2a 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b d9 00 01 0f e4 00 01
Realtek Bluetooth :08 f3 00 01 0c f4 00 08 01 00 01 90 00 00 09 04
Realtek Bluetooth :Load FW /lib/firmware/rtlbt/rtl8723d_fw OK, size 52096
Realtek Bluetooth :rtb_get_fw_project_id: opcode 0, len 1, data 9
Realtek Bluetooth :FW version 0xaa7add92, Patch num 3
Realtek Bluetooth :Chip id 0x0001
Realtek Bluetooth :Chip id 0x0002
Realtek Bluetooth :Chip id 0x0003
Realtek Bluetooth :Patch length 0x81b8
Realtek Bluetooth :Start offset 0x00004980
Realtek Bluetooth :Svn version: 20318
Realtek Bluetooth :Coexistence: BTCOEX_20180125-2323
Realtek Bluetooth :FW exists, Config file exists
Realtek Bluetooth :Total len 33256 for fwc
Realtek Bluetooth :baudrate in change speed command: 0x02 0x80 0x92 0x04
Realtek Bluetooth :Receive cmd complete event of command: fc17
Realtek Bluetooth :Received cc of vendor change baud
Realtek Bluetooth :Final speed 1500000
Realtek Bluetooth :end_idx: 131, lp_len: 244, additional pkts: 0
Realtek Bluetooth :Start downloading...
Realtek Bluetooth :Send last pkt
Realtek Bluetooth :Enable host hw flow control
Realtek Bluetooth :h5_hci_reset: Issue hci reset cmd
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth WARN: OP_HCI_RESET Transmission timeout
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth WARN: OP_HCI_RESET Transmission timeout
Realtek Bluetooth ERROR: Retransmission exhausts
root@TinaLinux:/#
奇怪,我的 H5 勾上了 CONFIG_BT_HCIUART_3WIRE=y 也一样的。
全志D1/D1s RISC-V(基于平头哥C906) 哪吒开发板超全资料合集
https://whycan.com/t_6440.html
开发板原理图: D1哪吒开发板原理图20210224.pdf
开发板元器件标号图: D1开发板哪吒位号图20210224.pdf
$ npm install
loadDep:zxcvbn → get ▄ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @socket.io/redis-adapter@7.1.0: wanted: {"node":">=10.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine spider-detector@2.0.0: wanted: {"node":">=8.15.0","npm":">=6.9.0","yarn":">=1.17.3"} (current: {"node":"8.10.0loadDep:zxcvbn → cache ad ▄ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine ipaddr.js@2.0.1: wanted: {"node":">= 10"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:zxcvbn → mapToReg ▀ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine connect-pg-simple@7.0.0: wanted: {"node":">=12.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:zxcvbn → resolveW ▀ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine connect-redis@6.0.0: wanted: {"node":">=12"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine html-to-text@8.1.0: wanted: {"node":">=10.23.2"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
loadDep:zxcvbn ▐ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine archiver@5.3.0: wanted: {"node":">= 10"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:zxcvbn → mapToReg ▌ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:zxcvbn → addRemot ▐ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
loadDep:zxcvbn → addRemot ▐ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:zxcvbn → mapToReg ▌ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
WARN engine helmet@4.6.0: wanted: {"node":">=10.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
WARN engine postcss@8.4.4: wanted: {"node":"^10 || ^12 || >=14"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine sharp@0.29.3: wanted: {"node":">=12.13.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
WARN engine autoprefixer@10.4.0: wanted: {"node":"^10 || ^12 || >=14"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine mongodb@4.2.1: wanted: {"node":">=12.9.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
确实值得学习,那些网络设备 br-lan, mon0 什么的以前都没见过,
[ 1021.395647] dhd_stop: Enter c31ef800
[ 1021.400934] dhd_set_mcast_list_handler: interface info not available/down
[ 1021.409582] dhdcdc_set_ioctl: SET PM to 0
[ 1021.418839] CFGP2P-ERROR) wl_cfgp2p_disable_discovery :
[ 1021.418852] do nothing, not initialized
[ 1021.428259] CFGP2P-ERROR) wl_cfgp2p_deinit_priv :
[ 1021.428264] In
[ 1021.439386] dhd_stop: Exit
[ 1021.525007] dhd_open: Enter c31ef800
[ 1021.562579] dhd_open: Exit ret=0
[ 1021.593042] dhd_set_monitor: if 0 val 1851876211,cur (null)
[ 1021.692969] dhdcdc_set_ioctl: SET PM to 0
[ 1021.785666] dhd_set_monitor: if 0 val 3,cur c248e000
[ 1021.790644] dhd_set_monitor: Mismatched params, return
[ 1198.921753] device mon0 entered promiscuous mode
[ 1618.888547] sys_check.sh (16292): drop_caches: 3
[ 2218.911067] sys_check.sh (19352): drop_caches: 3
[ 2818.921089] sys_check.sh (22296): drop_caches: 3
[ 3418.947203] sys_check.sh (25270): drop_caches: 3
[ 4019.001705] sys_check.sh (28157): drop_caches: 3
[ 4618.970054] sys_check.sh (31190): drop_caches: 3
shell 信息可以出现在 kmsg 里面是什么原理?
还有他的WIFI网卡,既可以自己做热点,又可以同时连接别的热点,不知道怎么做到的。
目前还不能通过WIFI桥接上网, 虽然在串口终端ping qq.com 正常。
U-Boot SPL 2021.07 (Nov 13 2021 - 11:49:14 +0800)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2021.07 (Nov 13 2021 - 11:49:14 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Smallwit Pi Lite
DRAM: 64 MiB
MMC: mmc@1c0f000: 0
Loading Environment from nowhere... OK
In: serial@1c28000
Out: serial@1c28000
Err: serial@1c28000
Net: No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
MMC Device 1 not found
no mmc device at slot 1
SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
=========================
Boot Device: mmc0
Boot Slot 0: mmc0
Boot Slot 1: spi-nor
=========================
switch to partitions #0, OK
mmc0 is current device
Booting from MMC0...
4661328 bytes read in 261 ms (17 MiB/s)
14142 bytes read in 5 ms (2.7 MiB/s)
Kernel image @ 0x40000000 [ 0x000000 - 0x472050 ]
## Flattened Device Tree blob at 40700000
Booting using the fdt blob at 0x40700000
Loading Device Tree to 416f9000, end 416ff73d ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
注意看信息,第一次是SPL,第二次才是真正的UBOOT
@cloudxxcloud
https://www.allwinnertech.com/uploads/pdf/20210803142431e6.pdfA133 / T509 的马甲
好像还有一个马甲叫 MR813 ?
objdump -T 查看动态链接库导出的函数。
$ riscv64-linux-gnu-objdump -T ./out/d1-nezha/compile_dir/target/rootfs/usr/lib/libuapi.so
./out/d1-nezha/compile_dir/target/rootfs/usr/lib/libuapi.so: file format elf64-littleriscv
DYNAMIC SYMBOL TABLE:
0000000000001970 l d .text 0000000000000000 .text
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 fprintf
0000000000000000 w D *UND* 0000000000000000 _ITM_deregisterTMCloneTable
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 getenv
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 munmap
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 malloc
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 fputs
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 usleep
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 mmap64
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 __errno_location
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 pthread_mutex_unlock
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 memcpy
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 strerror
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 close
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 puts
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 ioctl
0000000000000000 DO *UND* 0000000000000000 GLIBC_2.27 stderr
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 pthread_mutex_lock
0000000000000000 w DF *UND* 0000000000000000 GLIBC_2.27 __cxa_finalize
0000000000000000 w D *UND* 0000000000000000 _ITM_registerTMCloneTable
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 open64
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 strcmp
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 memset
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 free
0000000000005258 g DO .bss 0000000000000028 Base g_ion_mutex_alloc
0000000000001aae g DF .text 0000000000000066 Base sunxi_ion_alloc_get_viraddr_byFd
0000000000002120 g DF .text 000000000000009e Base sunxi_ion_alloc_get_total_size
00000000000023ca g DF .text 0000000000000014 Base sunxi_ion_flush_cache_all
0000000000002b0e g DF .text 00000000000000ee Base DispQueueToDisplay
0000000000002e26 g DF .text 00000000000000fa Base DispInit
00000000000021ce g DF .text 0000000000000096 Base sunxi_ion_alloc_phy2vir_cpu
0000000000001b14 g DF .text 000000000000011e Base sunxi_ion_alloc_open
00000000000023e8 g DF .text 000000000000009c Base nv_rotage90
0000000000002768 g DF .text 0000000000000074 Base DispSetRect
00000000000030d6 g DF .text 0000000000000016 Base DestroyVideoOutport
0000000000005288 g DO .bss 0000000000000030 Base mLayerStatus
000000000000232c g DF .text 0000000000000004 Base sunxi_ion_alloc_shutdown
0000000000002484 g DF .text 00000000000000a2 Base nv_rotage270
0000000000002bfc g DF .text 00000000000001ce Base DispWriteData
0000000000002350 g DF .text 000000000000007a Base sunxi_ion_alloc_close
0000000000002612 g DF .text 00000000000000d6 Base DispAllocateVideoMem
0000000000002552 g DF .text 000000000000001c Base DispGetScreenHeight
0000000000002ff6 g DF .text 000000000000002c Base disp_layer_off
000000000000252e g DF .text 0000000000000008 Base DispSetRoute
0000000000001a1e g DF .text 0000000000000004 Base sunxi_ion_alloc_setup
0000000000002330 g DF .text 0000000000000010 Base sunxi_ion_alloc_read
0000000000002f20 g DF .text 000000000000004a Base LayerClose
0000000000001a22 g DF .text 0000000000000010 Base sunxi_ion_alloc_memset
0000000000002f96 g DF .text 0000000000000034 Base DispDeinit
0000000000001e40 g DF .text 000000000000010e Base sunxi_ion_alloc_pfree
0000000000001f4e g DF .text 00000000000001d2 Base sunxi_ion_alloc_alloc_drm
0000000000002736 g DF .text 0000000000000032 Base DispSetIoctl
00000000000025da g DF .text 0000000000000038 Base DispFreeVideoMem
000000000000284c g DF .text 0000000000000090 Base DispSetEnable
0000000000002340 g DF .text 0000000000000010 Base sunxi_ion_alloc_write
00000000000021be g DF .text 0000000000000010 Base sunxi_ion_alloc_copy
0000000000002f6a g DF .text 000000000000002c Base LayerRelease
0000000000002526 g DF .text 0000000000000008 Base DispSetRotateAngel
0000000000002fca g DF .text 000000000000002c Base disp_layer_on
0000000000002dca g DF .text 000000000000005c Base LayerRequest
0000000000002536 g DF .text 000000000000001c Base DispGetScreenWidth
0000000000002264 g DF .text 000000000000008a Base sunxi_ion_alloc_get_bufferFd
0000000000003022 g DF .text 00000000000000b4 Base CreateVideoOutport
00000000000028dc g DF .text 000000000000006a Base DispSetSrcRect
0000000000005008 g DO .data 0000000000000090 Base _allocionMemOpsS
0000000000005280 g DO .bss 0000000000000008 Base g_ion_alloc_context
00000000000026e8 g DF .text 000000000000004e Base DispDequeue
00000000000023de g DF .text 000000000000000a Base GetMemAdapterOpsS
0000000000005248 g DO .bss 000000000000000c Base binfo
00000000000022ee g DF .text 000000000000003e Base sunxi_ion_alloc_flush_cache
0000000000001a32 g DF .text 000000000000007c Base sunxi_ion_alloc_vir2phy_cpu
00000000000027dc g DF .text 0000000000000070 Base DispSetZorder
0000000000001c32 g DF .text 000000000000020e Base sunxi_ion_alloc_palloc
https://blog.csdn.net/alifrank/article/details/48753105
行前肩(thp) + 行后肩(thb) = 1056
场前肩(tvp) + 场后肩(tvb) = 525
33300000/(1056*525)= 60.06fps