Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
2.0.1

2.0.1

changed STM32 GPIO code in BSPs
  • Loading branch information
quantum-leaps committed Jan 24, 2023
1 parent 54a4cd3 commit b5bdbea
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 590 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
[![Quantum Leaps](https://www.state-machine.com/attachments/logo_ql_400.png)](https://www.state-machine.com)
<hr>

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/ET/releases/latest)
[![GitHub](https://img.shields.io/github/license/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/Super-Simple-Tasker/blob/master/LICENSE.md)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/Super-Simple-Tasker/releases/latest)
[![GitHub](https://img.shields.io/github/license/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/Super-Simple-Tasker/blob/master/LICENSE)

# Super-Simple Tasker (SST)
Super-Simple Tasker (SST) is an event-driven, preemptive, priority-based
Expand Down
26 changes: 13 additions & 13 deletions img/blinky_button.pvs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[General]
decode_signals=0
generated_signals=0
views=1
meta_objs=1

[D0]
name=PB1
enabled=true
Expand All @@ -6,7 +12,7 @@ conversion_type=0
conv_options=0

[D1]
name=ISR
name=SysTick
enabled=true
color=4287582722
conversion_type=0
Expand Down Expand Up @@ -54,18 +60,12 @@ color=4285878395
conversion_type=0
conv_options=0

[General]
decode_signals=0
generated_signals=0
views=1
meta_objs=1

[view0]
scale=2.5453064548971696e-5
v_offset=-10
splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0^\0\0\x6W\x1\0\0\0\x1\x1\0\0\0\x1\0)
scale=3.183091418385535e-5
v_offset=0
splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0^\0\0\x5.\x1\0\0\0\x1\x1\0\0\0\x1\0)
segment_display_mode=3
offset=22 serialization::archive 14 0 0 0 0 0 0 0 0 0 0 0 0 0 6
offset=22 serialization::archive 14 0 0 0 0 416495 94118729 95485619 43701371 90132099 12637656 -8 0 0 6
zero_offset=22 serialization::archive 14 0 0 0 0 0 0 0 0 0 0 0 0 0 6
D0\trace_height=80
D1\trace_height=80
Expand All @@ -79,5 +79,5 @@ D7\trace_height=80
[meta_obj0]
type=selection
assoc_view=0
start_time=22 serialization::archive 14 0 0 0 0 1666404 16666666 67279583 79112806 14207498 32936046 -8 0 0 6
end_time=22 serialization::archive 14 0 0 0 0 1667245 83333333 34268289 14980433 18279087 18666778 -8 0 0 6
start_time=22 serialization::archive 14 0 0 0 0 1146079 16666666 66002716 29050666 88836086 13335114 -8 0 0 6
end_time=22 serialization::archive 14 0 0 0 0 1146558 33333333 32835546 33652556 73124920 20470248 -8 0 0 6
76 changes: 12 additions & 64 deletions sst0_c/examples/blinky_button/bsp_nucleo-h743zi.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,103 +146,51 @@ static void exerciseFPU(double x) {

/*..........................................................................*/
void BSP_d1on(void) { /* LED1-Green */
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << TST1_PIN);
SST_PORT_CRIT_EXIT();
GPIOB->BSRR = (1U << TST1_PIN);
/* don't use the FPU in the ISR */
}
void BSP_d1off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << (TST1_PIN + 16U));
SST_PORT_CRIT_EXIT();
/* don't use the FPU in the ISR */
GPIOB->BSRR = (1U << (TST1_PIN + 16U));
}
/*..........................................................................*/
void BSP_d2on(void) { /* LED3-Red */
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << TST2_PIN);
SST_PORT_CRIT_EXIT();

GPIOB->BSRR = (1U << TST2_PIN);
exerciseFPU(-1.2345);
}
void BSP_d2off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << (TST2_PIN + 16U));
SST_PORT_CRIT_EXIT();

exerciseFPU(1.2345);
GPIOB->BSRR = (1U << (TST2_PIN + 16U));
}
/*..........................................................................*/
void BSP_d3on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << TST3_PIN);
SST_PORT_CRIT_EXIT();

GPIOB->BSRR = (1U << TST3_PIN);
exerciseFPU(-12.345);
}
void BSP_d3off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << (TST3_PIN + 16U));
SST_PORT_CRIT_EXIT();

exerciseFPU(12.345);
GPIOB->BSRR = (1U << (TST3_PIN + 16U));
}
/*..........................................................................*/
void BSP_d4on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << TST4_PIN);
SST_PORT_CRIT_EXIT();

GPIOB->BSRR = (1U << TST4_PIN);
exerciseFPU(3.456);
}
void BSP_d4off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << (TST4_PIN + 16U));
SST_PORT_CRIT_EXIT();

exerciseFPU(-3.456);
GPIOB->BSRR = (1U << (TST4_PIN + 16U));
}
/*..........................................................................*/
void BSP_d5on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << TST5_PIN);
SST_PORT_CRIT_EXIT();

GPIOB->BSRR = (1U << TST5_PIN);
exerciseFPU(4.567);
}
void BSP_d5off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << (TST5_PIN + 16U));
SST_PORT_CRIT_EXIT();

exerciseFPU(-4.567);
GPIOB->BSRR = (1U << (TST5_PIN + 16U));
}
/*..........................................................................*/
void BSP_d6on(void) { /* LED2-Blue */
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << TST6_PIN);
SST_PORT_CRIT_EXIT();

GPIOB->BSRR = (1U << TST6_PIN);
exerciseFPU(1.2345);
}
void BSP_d6off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOB->BSRR |= (1U << (TST6_PIN + 16U));
SST_PORT_CRIT_EXIT();

exerciseFPU(-1.2345);
GPIOB->BSRR = (1U << (TST6_PIN + 16U));
}

/*..........................................................................*/
Expand Down
84 changes: 12 additions & 72 deletions sst0_c/examples/blinky_button/bsp_nucleo-l053r8.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,83 +134,23 @@ void BSP_init(void) {
}

/*..........................................................................*/
void BSP_d1on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << TST1_PIN);
SST_PORT_CRIT_EXIT();
}
void BSP_d1off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << (TST1_PIN + 16U));
SST_PORT_CRIT_EXIT();
}
void BSP_d1on(void) { GPIOA->BSRR = (1U << TST1_PIN); }
void BSP_d1off(void) { GPIOA->BSRR = (1U << (TST1_PIN + 16U)); }
/*..........................................................................*/
void BSP_d2on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << TST2_PIN);
SST_PORT_CRIT_EXIT();
}
void BSP_d2off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << (TST2_PIN + 16U));
SST_PORT_CRIT_EXIT();
}
void BSP_d2on(void) { GPIOA->BSRR = (1U << TST2_PIN); }
void BSP_d2off(void) { GPIOA->BSRR = (1U << (TST2_PIN + 16U)); }
/*..........................................................................*/
void BSP_d3on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << TST3_PIN);
SST_PORT_CRIT_EXIT();
}
void BSP_d3off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << (TST3_PIN + 16U));
SST_PORT_CRIT_EXIT();
}
void BSP_d3on(void) { GPIOA->BSRR = (1U << TST3_PIN); }
void BSP_d3off(void) { GPIOA->BSRR = (1U << (TST3_PIN + 16U)); }
/*..........................................................................*/
void BSP_d4on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << TST4_PIN);
SST_PORT_CRIT_EXIT();
}
void BSP_d4off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << (TST4_PIN + 16U));
SST_PORT_CRIT_EXIT();
}
void BSP_d4on(void) { GPIOA->BSRR = (1U << TST4_PIN); }
void BSP_d4off(void) { GPIOA->BSRR = (1U << (TST4_PIN + 16U)); }
/*..........................................................................*/
void BSP_d5on(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << TST5_PIN);
SST_PORT_CRIT_EXIT();
}
void BSP_d5off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << (TST5_PIN + 16U));
SST_PORT_CRIT_EXIT();
}
void BSP_d5on(void) { GPIOA->BSRR = (1U << TST5_PIN); }
void BSP_d5off(void) { GPIOA->BSRR = (1U << (TST5_PIN + 16U)); }
/*..........................................................................*/
void BSP_d6on(void) { /* LED2 */
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << TST6_PIN);
SST_PORT_CRIT_EXIT();
}
void BSP_d6off(void) {
SST_PORT_CRIT_STAT
SST_PORT_CRIT_ENTRY();
GPIOA->BSRR |= (1U << (TST6_PIN + 16U));
SST_PORT_CRIT_EXIT();
}
void BSP_d6on(void) { GPIOA->BSRR = (1U << TST6_PIN); } /* LED2 */
void BSP_d6off(void) { GPIOA->BSRR = (1U << (TST6_PIN + 16U)); }

/*..........................................................................*/
SST_Evt const *BSP_getWorkEvtBlinky1(uint8_t num) {
Expand Down
Loading

0 comments on commit b5bdbea

Please sign in to comment.