当前位置:网站首页>SPI - send 16 bit and 8-bit data
SPI - send 16 bit and 8-bit data
2022-07-24 07:11:00 【W_ oilpicture】
Preface
Life is a journey , I am also a pedestrian .
SPI 8 Bit data transfer

unsigned char code = 0xcf;
HAL_SPI_Transmit(&hspi1,code,1,0xffff);
SPI 16 Bit data transfer

- Method 1 : Change the number of digits to
16position , Call the send function :
uint16_t code[1] = {
0xcfff};
HAL_SPI_Transmit(&hspi1, (uint8_t *)code, 1, 0xffff);
- Method 2 : Configure to
8position Pattern , Then send two bits of data as an array :
unsigned char code[2] = {
0xcf, 0xff};
HAL_SPI_Transmit(&hspi1, code, 2, 0xffff);
边栏推荐
- Cmake notes
- Redis sentinel mechanism
- Huawei experts' self statement: how to become an excellent engineer
- 传统电商红利消失,怎么进军新型社交电商?
- C language from entry to soil (I)
- Traditional e-commerce dividends disappear, how to enter the new social e-commerce?
- 变量和数据类型(03)
- Libevent multithreaded server + client source code
- C language from entry to soil function
- MySql的DDL和DML和DQL的基本语法
猜你喜欢

C语言中extern,static, register,volatile 关键字的作用;保姆级教学!

Part II - C language improvement_ 4. Secondary pointer

JMeter笔记2 | JMeter原理及测试计划要素

重磅直播 | ORB-SLAM3系列代码讲解地图点(专题二)

JMeter notes 2 | JMeter principle and test plan elements

Filter 过滤器

Take you to learn C step by step (second)

C language from entry to Earth - array

论文阅读:HarDNet: A Low Memory Traffic Network

The function of extern, static, register, volatile keywords in C language; Nanny level teaching!
随机推荐
处理树形结构数据
Use the root user to create a new user and set the password for
8. Use the quadratic geometry technology to draw a small column on the screen.
ROS starts non native nodes
【方向盘】超爱的IDEA提效神器Save Actions,卸载了
In the era of e-commerce, what should enterprises do in the transformation of social e-commerce?
After grouping, return to the last record group in each group_ Use of concat
Take you to learn C step by step (second)
你就是你,没有人可以取代
Never lose yourself!
C language from entry to soil (II)
Prompt for garbled code when CHM file is opened
找工作备忘
Create WPF project
Redis persistence
Traditional e-commerce dividends disappear, how to enter the new social e-commerce?
Redis 分片集群
论文阅读:HarDNet: A Low Memory Traffic Network
Libevent multithreaded server + client source code
9. Use grid technology to draw a Pentagon on the screen.