Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
unl-ece-keychain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pscalise2
unl-ece-keychain
Commits
05d4bd2f
Commit
05d4bd2f
authored
4 months ago
by
paulscalise1
Browse files
Options
Downloads
Patches
Plain Diff
updated code and added slower program speed
parent
643276f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.vscode/launch.json
+1
-0
1 addition, 0 deletions
.vscode/launch.json
inc/frames.h
+1453
-1390
1453 additions, 1390 deletions
inc/frames.h
puya-32-environment-setup
+1
-1
1 addition, 1 deletion
puya-32-environment-setup
src/display.c
+1
-1
1 addition, 1 deletion
src/display.c
src/main.c
+31
-15
31 additions, 15 deletions
src/main.c
with
1487 additions
and
1407 deletions
.vscode/launch.json
+
1
−
0
View file @
05d4bd2f
...
...
@@ -25,6 +25,7 @@
"svdFile"
:
"CMSIS/Device/PY32F0xx/py32f030axx.svd"
,
"preLaunchTask"
:
"Build"
,
"showDevDebugOutput"
:
"raw"
,
"serverArgs"
:
[
"-speed"
,
"1000"
]
}
]
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
inc/frames.h
+
1453
−
1390
View file @
05d4bd2f
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
puya-32-environment-setup
@
60237064
Compare
666a040a
...
60237064
Subproject commit 6
66a040a623e1dd84af2cf40dc88524060e80a30
Subproject commit 6
02370646d9a413f41de97b1d8858297a89ddb1c
This diff is collapsed.
Click to expand it.
src/display.c
+
1
−
1
View file @
05d4bd2f
//
#include <stdint.h>
#include
<stdint.h>
uint8_t
set_display
[]
=
{
0x00
,
0xAE
};
//set (SSD1306_DISPLAY_OFF)
uint8_t
set_col_addr
[]
=
{
0x00
,
0x21
,
0x00
,
0x7F
};
...
...
This diff is collapsed.
Click to expand it.
src/main.c
+
31
−
15
View file @
05d4bd2f
...
...
@@ -234,6 +234,31 @@ void EXTI4_15_IRQHandler(void)
HAL_GPIO_EXTI_IRQHandler
(
GPIO_PIN_5
);
}
void
Display_UNL_Info
(){
displayArray
(
flag
,
2
,
20
,
0
,
70
);
displayArray
(
pointers
,
2
,
8
,
1
,
35
);
ssd1306_bitmap
((
const
uint8_t
*
)
dept
);
HAL_Delay
(
3000
);
displayArray
(
flag
,
2
,
20
,
0
,
70
);
displayArray
(
pointers
,
2
,
8
,
1
,
35
);
ssd1306_bitmap
((
const
uint8_t
*
)
dept
);
HAL_Delay
(
3000
);
}
void
Display_On
(){
uint8_t
on
[
2
]
=
{
0x00
,
0xAF
};
HAL_I2C_Master_Transmit
(
&
hi2c1
,
SSD1306_ADDR
,
on
,
2
,
5000
);
}
void
Sleep
(){
uint8_t
try1
[
2
]
=
{
0x00
,
0xAE
};
HAL_I2C_Master_Transmit
(
&
hi2c1
,
SSD1306_ADDR
,
try1
,
2
,
5000
);
HAL_SuspendTick
();
/* Enter STOP mode */
HAL_PWR_EnterSTOPMode
(
PWR_LOWPOWERREGULATOR_ON
,
PWR_STOPENTRY_WFI
);
HAL_ResumeTick
();
}
int
main
(
void
)
{
//test = 0xfe;
...
...
@@ -246,23 +271,14 @@ int main (void)
LED_Init
();
ssd1306_init
();
ssd1306_clear
();
uint8_t
try
[
2
]
=
{
0x00
,
0xA4
};
HAL_I2C_Master_Transmit
(
&
hi2c1
,
SSD1306_ADDR
,
try
,
2
,
5000
);
uint8_t
off
[
2
]
=
{
0x00
,
0xA4
};
HAL_I2C_Master_Transmit
(
&
hi2c1
,
SSD1306_ADDR
,
off
,
2
,
5000
);
while
(
1
)
{
uint8_t
try1
[
2
]
=
{
0x00
,
0xAE
};
HAL_I2C_Master_Transmit
(
&
hi2c1
,
SSD1306_ADDR
,
try1
,
2
,
5000
);
HAL_SuspendTick
();
/* Enter STOP mode */
HAL_PWR_EnterSTOPMode
(
PWR_LOWPOWERREGULATOR_ON
,
PWR_STOPENTRY_WFI
);
HAL_ResumeTick
();
uint8_t
try2
[
2
]
=
{
0x00
,
0xAF
};
HAL_I2C_Master_Transmit
(
&
hi2c1
,
SSD1306_ADDR
,
try2
,
2
,
5000
);
displayArray
(
flag
,
2
,
20
,
0
,
70
);
displayArray
(
pointers
,
2
,
8
,
1
,
35
);
Display_On
();
Display_UNL_Info
();
// Add more frames here
ssd1306_bitmap
((
const
uint8_t
*
)
dept
);
HAL_Delay
(
3000
);
Sleep
();
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment