Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
HaoJin232
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
时昊
HaoJin232
Commits
0a4755cd
Commit
0a4755cd
authored
Feb 18, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎉
init:删除无用代码-光线强度检测
parent
6b2301bf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
525 additions
and
669 deletions
+525
-669
QJ300_circle.map
HJ232_Source/Out/QJ300_circle.map
+525
-525
LightDetect.c
HJ232_Source/source/Application/LightDetect/LightDetect.c
+0
-59
LightDetect.h
HJ232_Source/source/Application/LightDetect/LightDetect.h
+0
-9
LtDet_ORAP_29044.c
..._Source/source/Application/LightDetect/LtDet_ORAP_29044.c
+0
-64
LtDet_ORAP_29044.h
..._Source/source/Application/LightDetect/LtDet_ORAP_29044.h
+0
-11
tasks.c
HJ232_Source/source/System/tasks.c
+0
-1
No files found.
HJ232_Source/Out/QJ300_circle.map
View file @
0a4755cd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
HJ232_Source/source/Application/LightDetect/LightDetect.c
deleted
100644 → 0
View file @
6b2301bf
/******************************************************************************
文 件 名:LightDetect.c
功能描述:光线强度检测驱动文件
作 者:刘庆宇
版 本:V1.0
日 期:2021.1.15
******************************************************************************/
#include "common.h"
#include "LightDetect.h"
#include "LtDet_ORAP_29044.h"
static
uint16_t
LightValue
=
0
;
/******************************************************************************
Function:Light_Detect_KL30_Init
Description:该服务函数首次KL30时调用一次
Input:
Output:
******************************************************************************/
void
Light_Detect_KL30_Init
(
void
)
{
}
/******************************************************************************
Function:Light_Detect_KL15_Init
Description:该服务函数首次KL15时调用一次
Input:
Output:
******************************************************************************/
void
Light_Detect_KL15_Init
(
void
)
{
ORAP_29044_Init
();
LightValue
=
1200
;
}
/******************************************************************************
Function:Light_Detect_Serivce
Description:光线检测服务函数,放在100ms任务
Input:
Output:
******************************************************************************/
void
Light_Detect_Serivce
(
void
)
{
static
uint8_t
temp8
=
20
;
if
(
temp8
==
0
){
LightValue
=
Read_Light_value
();
}
else
{
temp8
--
;
}
}
uint16_t
Get_Light_Value
(
void
)
{
return
LightValue
;
}
HJ232_Source/source/Application/LightDetect/LightDetect.h
deleted
100644 → 0
View file @
6b2301bf
#ifndef LIGHT_DETECT_H
#define LIGHT_DETECT_H
extern
void
Light_Detect_KL30_Init
(
void
);
extern
void
Light_Detect_KL15_Init
(
void
);
extern
void
Light_Detect_Serivce
(
void
);
uint16_t
Get_Light_Value
(
void
);
#endif
HJ232_Source/source/Application/LightDetect/LtDet_ORAP_29044.c
deleted
100644 → 0
View file @
6b2301bf
#include "LtDet_ORAP_29044.h"
#include "LtDet_Simulated_IIC_Master.h"
#define ORAP_29044_DEVICE_ADDR 0x88u
void
LtDet_i2c_write_one_byte
(
uint8_t
DEVICE_ADDR
,
uint8_t
REG_ADDR
,
uint8_t
data
)
{
LtDet_IIC_Delay
();
LtDet_IIC_Start
();
LtDet_IIC_Transmit_Data
(
DEVICE_ADDR
);
LtDet_IIC_Transmit_Data
(
REG_ADDR
);
LtDet_IIC_Transmit_Data
(
data
);
LtDet_IIC_Stop
();
}
uint8_t
LtDet_i2c_read_one_byte
(
uint8_t
DEVICE_ADDR
,
uint8_t
REG_ADDR
)
{
uint8_t
data
=
0u
;
LtDet_IIC_Delay
();
LtDet_IIC_Start
();
LtDet_IIC_Transmit_Data
(
DEVICE_ADDR
);
LtDet_IIC_Transmit_Data
(
REG_ADDR
);
LtDet_IIC_Start
();
LtDet_IIC_Transmit_Data
(
DEVICE_ADDR
+
1
);
data
=
LtDet_IIC_Receive_Data
();
LtDet_IIC_Transmit_ACK
(
IIC_ACK
);
LtDet_IIC_Stop
();
return
data
;
}
void
ORAP_29044_Init
(
void
)
{
LtDet_IIC_Init
();
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x00);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x0F,0x29);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x0E,0x00);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x0F,0x00);
LtDet_i2c_write_one_byte
(
ORAP_29044_DEVICE_ADDR
,
0x01
,
0x06
);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x06);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x06);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x06);
}
uint16_t
Read_Light_value
(
void
)
{
uint16_t
temp16
;
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x06);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x06);
// LtDet_i2c_write_one_byte(ORAP_29044_DEVICE_ADDR,0x01,0x06);
temp16
=
LtDet_i2c_read_one_byte
(
ORAP_29044_DEVICE_ADDR
,
0x0A
);
LtDet_i2c_write_one_byte
(
ORAP_29044_DEVICE_ADDR
,
0x01
,
0x06
);
temp16
<<=
8
;
temp16
|=
LtDet_i2c_read_one_byte
(
ORAP_29044_DEVICE_ADDR
,
0x09
);
return
temp16
;
}
HJ232_Source/source/Application/LightDetect/LtDet_ORAP_29044.h
deleted
100644 → 0
View file @
6b2301bf
#ifndef _LTDET_ORAP29044_H_
#define _LTDET_ORAP29044_H_
#include "common.h"
extern
void
ORAP_29044_Init
(
void
);
extern
uint16_t
Read_Light_value
(
void
);
#endif
HJ232_Source/source/System/tasks.c
View file @
0a4755cd
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "Flash_synchronizer.h"
#include "Flash_synchronizer.h"
#include "eepromManage.h"
#include "eepromManage.h"
#include "Data_Gear.h"
#include "Data_Gear.h"
#include "LightDetect.h"
#include "BGLInterface.h"
#include "BGLInterface.h"
#include "Key.h"
#include "Key.h"
...
...
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