Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
raspberry_Holographic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张泽仁
raspberry_Holographic
Commits
a2d3790d
Commit
a2d3790d
authored
Oct 25, 2023
by
张泽仁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
organize project
parent
9ce0beba
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8524 additions
and
0 deletions
+8524
-0
LocalDimmingLedData.h
raspberrypi_spi/LocalDimming/LocalDimmingLedData.h
+8049
-0
Makefile
raspberrypi_spi/LocalDimming/Makefile
+9
-0
interface.c
raspberrypi_spi/LocalDimming/interface.c
+409
-0
interface.h
raspberrypi_spi/LocalDimming/interface.h
+20
-0
interface.o
raspberrypi_spi/LocalDimming/interface.o
+0
-0
main.c
raspberrypi_spi/LocalDimming/main.c
+37
-0
No files found.
raspberrypi_spi/LocalDimming/LocalDimmingLedData.h
0 → 100644
View file @
a2d3790d
This diff is collapsed.
Click to expand it.
raspberrypi_spi/LocalDimming/Makefile
0 → 100644
View file @
a2d3790d
CC
=
gcc
TARGET
=
main
LDFLAGS
=
-lwiringPi
SRCS
=
main.c interface.c
HDRS
=
interface.h LocalDimmingLedData.h
$(TARGET)
:
$(SRCS) $(HEADERS)
$(CC)
-o
$(TARGET)
$(SRCS)
$(LDFLAGS)
\ No newline at end of file
raspberrypi_spi/LocalDimming/interface.c
0 → 100644
View file @
a2d3790d
This diff is collapsed.
Click to expand it.
raspberrypi_spi/LocalDimming/interface.h
0 → 100644
View file @
a2d3790d
#ifndef __INTERFACE__H
#define __INTERFACE__H
extern
void
LocalDimming_Init
();
extern
void
setGpioLevel
(
int
num
,
int
level
);
extern
int
SPI_Transfer
(
const
char
*
pu8TxBuf
,
char
*
pu8RxBuf
,
int
i32len
);
extern
int
AW20144_Byte_Write
(
int
i32ChipSelect
,
char
u8Page
,
char
u8Addr
,
char
u8Val
);
extern
void
resetPwm
();
extern
void
setPwmtomax
();
extern
void
eachPicWrite
(
int
num
,
int
pic
);
int
xfm_Init
();
void
protocalAck
(
int
fileusb
);
uint16_t
getAngle
(
char
*
rece
);
uint16_t
CrcValueCalc
(
const
uint8_t
*
cpucData
,
uint16_t
usLength
);
void
sentUart
(
char
*
buf
,
int
fileuart
);
void
circleReading
();
typedef
void
(
*
audio_event_cb_t
)(
void
*
user_ctx
,
int
id
);
void
audio_set_callback
(
audio_event_cb_t
cb
,
void
*
user_ctx
);
#endif
raspberrypi_spi/LocalDimming/interface.o
0 → 100644
View file @
a2d3790d
File added
raspberrypi_spi/LocalDimming/main.c
0 → 100644
View file @
a2d3790d
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/spi/spidev.h>
#include <stdint.h>
#include <wiringPi.h>
#include <string.h>
#include "interface.h"
//#include "LocalDimmingLedData.h"
#define SPI_DEVICE "/dev/spidev0.0" // SPI设备文件路径
int
main
()
{
LocalDimming_Init
();
//setPwmtomax();
//resetPwm();
/*
printf("input num:\n");
int num;
int pic;
scanf(" %d", &num);
scanf("%d", &pic);
*/
resetPwm
();
int
ch
;
scanf
(
"%d"
,
&
ch
);
if
(
ch
)
{
setPwmtomax
();
}
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment