Skip to content

Commit 00f4d23

Browse files
Merge pull request #319 from MikroElektronika/future-release-2.14.2-plus
Release 2.14.3
2 parents 740cd33 + 91a882e commit 00f4d23

File tree

30 files changed

+631
-19
lines changed

30 files changed

+631
-19
lines changed

bsp/board/include/boards/board_easy24_33_v6/board.h

+10
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ extern "C"{
135135
#endif
136136
// EOF USB Uart connections
137137

138+
// LCD
139+
#define LCD_RST GPIO_PB4
140+
#define LCD_CS GPIO_PB5
141+
#define LCD_BPWM HAL_PIN_NC
142+
#define LCD_D4 GPIO_PB6
143+
#define LCD_D5 GPIO_PA0
144+
#define LCD_D6 GPIO_PA1
145+
#define LCD_D7 GPIO_PA4
146+
// EOF LCD
147+
138148
#ifdef __cplusplus
139149
}
140150
#endif

bsp/board/include/boards/board_easyavr_pro_v8/board.h

+8
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ extern "C"{
174174
#define TFT_16BIT_DATA_PORT_CH1 LCD_TFT_16BIT_CH1
175175
#define TFT_16BIT_DATA_PORT_CH1_MASK LCD_TFT_16BIT_CH1_MASK
176176

177+
#define LCD_RST LEFT_CN_PIN_025
178+
#define LCD_CS LEFT_CN_PIN_026
179+
#define LCD_BPWM LEFT_CN_PIN_056
180+
#define LCD_D4 LEFT_CN_PIN_034
181+
#define LCD_D5 LEFT_CN_PIN_035
182+
#define LCD_D6 LEFT_CN_PIN_036
183+
#define LCD_D7 LEFT_CN_PIN_037
184+
177185
#ifdef __cplusplus
178186
}
179187
#endif

bsp/board/include/boards/board_easyavr_v7/board.h

+8
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ extern "C"{
128128
#define TP_MIKROE_YU GPIO_PA3
129129
#define TP_MIKROE_YD GPIO_PA0
130130

131+
#define LCD_RST GPIO_PA2
132+
#define LCD_CS GPIO_PD6
133+
#define LCD_BPWM GPIO_PD5
134+
#define LCD_D4 GPIO_PC4
135+
#define LCD_D5 GPIO_PC5
136+
#define LCD_D6 GPIO_PC6
137+
#define LCD_D7 GPIO_PC7
138+
131139
// Default TP_MIKROE touch panel calibration values.
132140
#define TP_MIKROE_CALIBRATION_XMIN 120
133141
#define TP_MIKROE_CALIBRATION_XMAX 910

bsp/board/include/boards/board_easypic_pro_v7/board.h

+8
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ extern "C"{
128128
#define TP_MIKROE_YU LEFT_CN_PIN_19
129129
#define TP_MIKROE_YD DOWN_CN_PIN_43
130130

131+
#define LCD_RST GPIO_PB4
132+
#define LCD_CS GPIO_PB5
133+
#define LCD_BPWM HAL_PIN_NC
134+
#define LCD_D4 GPIO_PB0
135+
#define LCD_D5 GPIO_PB1
136+
#define LCD_D6 GPIO_PB2
137+
#define LCD_D7 GPIO_PB3
138+
131139
// Default TP_MIKROE touch panel calibration values.
132140
#define TP_MIKROE_CALIBRATION_XMIN MCU_CALIBRATION_XMIN
133141
#define TP_MIKROE_CALIBRATION_XMAX MCU_CALIBRATION_XMAX

bsp/board/include/boards/board_easypic_v7/board.h

+8
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ extern "C"{
114114
#define TP_MIKROE_YU GPIO_PC1
115115
#define TP_MIKROE_YD GPIO_PA0
116116

117+
#define LCD_RST GPIO_PB4
118+
#define LCD_CS GPIO_PB5
119+
#define LCD_BPWM HAL_PIN_NC
120+
#define LCD_D4 GPIO_PB0
121+
#define LCD_D5 GPIO_PB1
122+
#define LCD_D6 GPIO_PB2
123+
#define LCD_D7 GPIO_PB3
124+
117125
// Default TP_MIKROE touch panel calibration values.
118126
#define TP_MIKROE_CALIBRATION_XMIN 120
119127
#define TP_MIKROE_CALIBRATION_XMAX 910

bsp/board/include/boards/board_easypic_v7_for_dspic30/board.h

+8
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ extern "C"{
114114
#define TP_MIKROE_YU GPIO_PC14
115115
#define TP_MIKROE_YD GPIO_PB8
116116

117+
#define LCD_RST GPIO_PB2
118+
#define LCD_CS GPIO_PB4
119+
#define LCD_BPWM HAL_PIN_NC
120+
#define LCD_D4 GPIO_PB12
121+
#define LCD_D5 GPIO_PB13
122+
#define LCD_D6 GPIO_PB14
123+
#define LCD_D7 GPIO_PB15
124+
117125
// Default TP_MIKROE touch panel calibration values.
118126
#define TP_MIKROE_CALIBRATION_XMIN 120
119127
#define TP_MIKROE_CALIBRATION_XMAX 910

bsp/board/include/boards/clicker_4_for_pic18f/board.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C"{
5252
#define BOARD_REV_MAJOR (1)
5353
#define BOARD_REV_MINOR (01)
5454

55-
#define BOARD_NAME "Clicker 4 for PIC18F"
55+
#define BOARD_NAME "Clicker 4 for PIC18F97J94"
5656

5757
#include "hal_target.h"
5858
#include "mikrobus.h"

bsp/board/include/boards/clicker_4_for_stm32/board.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C"{
5252
#define BOARD_REV_MAJOR (1)
5353
#define BOARD_REV_MINOR (01)
5454

55-
#define BOARD_NAME "Clicker 4 for STM32"
55+
#define BOARD_NAME "Clicker 4 for STM32F767BI"
5656

5757
#include "mikrobus.h"
5858

bsp/board/include/boards/clicker_4_for_stm32f302vct6/board.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C"{
5252
#define BOARD_REV_MAJOR (1)
5353
#define BOARD_REV_MINOR (00)
5454

55-
#define BOARD_NAME "Clicker 4 for STM32F302VCT6"
55+
#define BOARD_NAME "Clicker 4 for STM32F302VC"
5656

5757
#include "mikrobus.h"
5858

bsp/board/include/boards/clicker_4_for_stm32f4/board.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C"{
5252
#define BOARD_REV_MAJOR (1)
5353
#define BOARD_REV_MINOR (01)
5454

55-
#define BOARD_NAME "Clicker 4 for STM32F4"
55+
#define BOARD_NAME "Clicker 4 for STM32F407VG"
5656

5757
#include "mikrobus.h"
5858

changelog/v2.14.3/changelog.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<p align="center">
2+
<img src="http://www.mikroe.com/img/designs/beta/logo_small.png?raw=true" alt="MikroElektronika"/>
3+
</p>
4+
5+
---
6+
7+
**[BACK TO MAIN FILE](../../changelog.md)**
8+
9+
---
10+
11+
# `v2.14.3`
12+
13+
+ released: 2025-03-28
14+
15+
## Changes
16+
17+
+ [`v2.14.3`](#v2143)
18+
+ [Changes](#changes)
19+
+ [New features](#new-features)
20+
+ [mikroSDK](#mikrosdk)
21+
+ [Improvements](#improvements)
22+
+ [mikroSDK](#mikrosdk-1)
23+
+ [Fixes](#fixes)
24+
+ [mikroSDK](#mikrosdk-2)
25+
+ [NEW HARDWARE](#new-hardware)
26+
27+
### New features
28+
29+
#### mikroSDK
30+
31+
+ Button simulation library
32+
+ Implemented a useful new library, especially handy while using a remote setup on Planet Debug
33+
+ The library includes various button-handling simulation functions, enabling a range of applications
34+
35+
### Improvements
36+
37+
#### mikroSDK
38+
39+
+ Added `digital_out_read` function to the driver level
40+
+ Allows reading the output value of a pin, which is required by some architectures
41+
+ Complements the existing `digital_in_read` function
42+
43+
### Fixes
44+
45+
#### mikroSDK
46+
47+
+ Updated the delay function calls in the PIC32 `hal_ll_errata.c` file to fit the requirements of all adequate compilers
48+
+ Eliminated wrong symbols from LCD
49+
+ LCD used to show "garbage" symbols regardless of achitecture
50+
+ Added missing LCD pin definitions for certain v7 boards
51+
+ Some v7 boards with an LCD socket lacked the necessary pin definitions for the LCD library
52+
+ Updated Clicker 4 board names
53+
+ They have been changed to fit the new naming convention
54+
55+
### NEW HARDWARE
56+
57+
> NOTE:
58+
>> If any new hardware was added to current version, it will be listed here.
59+
60+
Support added for following hardware:
61+
62+
---
63+
64+
**[BACK TO MAIN FILE](../../changelog.md)**
65+
66+
---

drv/lib/include/drv_digital_out.h

+26
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,32 @@ err_t digital_out_toggle( digital_out_t *out );
232232
err_t digital_out_write( digital_out_t *out, uint8_t value );
233233
#endif
234234

235+
/**
236+
* @brief Read GPIO pin.
237+
* @details Reads the current output value of the individual GPIO pin.
238+
* @param[in] out Digital output driver context structure.
239+
* See #digital_out_t structure definition for detailed explanation.
240+
* @return Function returns pin logical state (1 or 0).
241+
* @pre Make sure that \p out structure has been declared and
242+
* initialized beforehand.
243+
* See #digital_out_t structure definition and #digital_out_init for detailed explanation.
244+
* @note Return value depends on signal being output to current pin.
245+
*
246+
* @b Example
247+
* @code
248+
* // GPIO value holder.
249+
* uint8_t value;
250+
*
251+
* // Read digital output value.
252+
* value = digital_out_read( &output_pin );
253+
* @endcode
254+
*/
255+
#if defined(FLATTEN_ME) && (FLATTEN_ME_LEVEL >= FLATTEN_ME_LEVEL_HIGH)
256+
#define digital_out_read(_handle) hal_gpio_read_pin_output( (hal_gpio_pin_t *)_handle )
257+
#else
258+
uint8_t digital_out_read( digital_out_t *out );
259+
#endif
260+
235261
/*! @} */ // digoutgroup
236262
/*! @} */ // drvgroup
237263
/*! @} */ // pergroup

drv/lib/src/lib_drv_digital_out/drv_digital_out.c

+12
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,16 @@ err_t digital_out_write( digital_out_t *out, uint8_t value )
102102
}
103103
#endif
104104

105+
#if (FLATTEN_ME_LEVEL < FLATTEN_ME_LEVEL_HIGH)
106+
uint8_t digital_out_read( digital_out_t *out )
107+
{
108+
if ( out->pin.base )
109+
{
110+
return hal_gpio_read_pin_output( &out->pin );
111+
} else {
112+
return 0;
113+
}
114+
}
115+
#endif
116+
105117
// ------------------------------------------------------------------------- END

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"display-name": "mikroSDK",
44
"description": "MikroSDK 2.0 is an embedded software development framework designed to simplify and accelerate application development on Mikroe hardware platform, specifically for Click Boards and other extension board drivers, on a broad range of microcontroller vendors and architectures. It includes peripheral libraries and drivers, middleware, board support, and application layer libraries among others.",
55
"icon": "images/icon-mikroSDK.png",
6-
"manifest-version": "1.0.24"
6+
"manifest-version": "1.0.25"
77
}

middleware/lcd/lib/src/drivers/controller/hd44780_lcd_controller.c

+32-1
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,45 @@
5151
*/
5252
#define timeout(_x) while(_x--) assembly(NOP);
5353

54-
/* ------------------------------------------- PUBLIC INTERFACE FUNCTION IMPLEMENTATION -----------------------------------------------------*/
54+
/**
55+
* @brief Generates pulse on command lines.
56+
* @details This function generates a high-to-low transition on the
57+
* LCD `reset` line and a toggle (high-low-high) on the `enable` (CS) line.
58+
* @param[in] rst LCD reset pin.
59+
* See #digital_out_t structure definition for detailed explanation.
60+
* @param[in] cs LCD "chip select" (enable) pin.
61+
* See #digital_out_t structure definition for detailed explanation.
62+
*
63+
* @return Nothing.
64+
*/
65+
static inline void lcd_pulse( digital_out_t rst, digital_out_t cs );
5566

67+
/* ------------------------------------------- PUBLIC INTERFACE FUNCTION IMPLEMENTATION -----------------------------------------------------*/
5668
void hd44780_lcd_init( uint32_t lcd_handle ) {
5769
lcd_handle_t lcd_handle_local;
5870
memcpy(&lcd_handle_local, (void *)lcd_handle, sizeof(lcd_handle_t));
5971

6072
if ( LCD_MODE_BIT_4 == lcd_handle_local.config.mode ) {
6173
// 4-bit mode.
6274
lcd_write( lcd_handle_local, LCD_CMD_FUNCTION_SET | LCD_CMD_MODE_4BIT, LCD_SELECT_CMD );
75+
lcd_pulse( lcd_handle_local.rst_pin, lcd_handle_local.cs_pin );
6376
Delay_ms( 5 );
6477
lcd_write( lcd_handle_local, LCD_CMD_FUNCTION_SET | LCD_CMD_MODE_4BIT, LCD_SELECT_CMD );
78+
lcd_pulse( lcd_handle_local.rst_pin, lcd_handle_local.cs_pin );
6579
Delay_ms( 5 );
6680
lcd_write( lcd_handle_local, LCD_CMD_FUNCTION_SET | LCD_CMD_MODE_4BIT, LCD_SELECT_CMD );
81+
lcd_pulse( lcd_handle_local.rst_pin, lcd_handle_local.cs_pin );
6782
Delay_ms( 1 );
6883
} else {
6984
// 8-bit mode - default state.
7085
lcd_write( lcd_handle_local, LCD_CMD_FUNCTION_SET, LCD_SELECT_CMD );
86+
lcd_pulse( lcd_handle_local.rst_pin, lcd_handle_local.cs_pin );
7187
Delay_ms( 5 );
7288
lcd_write( lcd_handle_local, LCD_CMD_FUNCTION_SET, LCD_SELECT_CMD );
89+
lcd_pulse( lcd_handle_local.rst_pin, lcd_handle_local.cs_pin );
7390
Delay_ms( 5 );
7491
lcd_write( lcd_handle_local, LCD_CMD_FUNCTION_SET, LCD_SELECT_CMD );
92+
lcd_pulse( lcd_handle_local.rst_pin, lcd_handle_local.cs_pin );
7593
Delay_ms( 1 );
7694
}
7795

@@ -85,3 +103,16 @@ void hd44780_lcd_init( uint32_t lcd_handle ) {
85103
}
86104

87105
// ------------------------------------------------------------------------ END
106+
107+
static inline void lcd_pulse( digital_out_t rst, digital_out_t cs ) {
108+
digital_out_low( &rst ); // Pull reset low to reset LCD
109+
Delay_ms( 1 ); // Wait for reset signal to settle
110+
111+
digital_out_high( &cs ); // Set CS high to start pulse
112+
Delay_us( 1 ); // Short delay for pulse width
113+
digital_out_low( &cs ); // Set CS low to end pulse
114+
115+
Delay_ms( 10 ); // Wait before next operation
116+
}
117+
118+
// ------------------------------------------------------------------------ END

middleware/lcd/lib/src/lcd.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,7 @@ static inline void lcd_pulse( lcd_handle_t lcd_handle, lcd_select_t cmd_or_data
333333
// Generate a High-to-low pulse on EN/CS pin.
334334
Delay_ms( 1 );
335335
digital_out_high( &lcd_handle.cs_pin );
336-
Delay_ms( 1 );
337-
336+
Delay_us( 1 );
338337
digital_out_low( &lcd_handle.cs_pin );
339338
Delay_ms( 10 );
340339
}

platform/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ if (NOT ${IS_BARE_METAL})
55
add_subdirectory(ring)
66
add_subdirectory(mikrosdk_version)
77
add_subdirectory(mikrobus)
8+
add_subdirectory(simulation)
89
endif()

platform/mikrosdk_version/include/mikrosdk_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extern "C"{
6767
* @note changes in patch version indicate smaller updates,
6868
* bug fixes and improvements
6969
*/
70-
#define mikroSDK_PATCH_VERSION 2
70+
#define mikroSDK_PATCH_VERSION 3
7171

7272
/**
7373
* @brief mikroSDK_GET_VERSION

platform/simulation/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## ./platform/simulation/CMakeLists.txt
2+
add_subdirectory(button)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## ./platform/simulation/button/CMakeLists.txt
2+
add_subdirectory(lib)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## ./platform/simulation/button/lib/CMakeLists.txt
2+
mikrosdk_add_library(lib_simulation_button MikroSDK.Simulation.Button
3+
src/simulation_button.c
4+
include/simulation_button.h
5+
)
6+
7+
target_link_libraries(lib_simulation_button
8+
PUBLIC
9+
MikroC.Core
10+
MikroSDK.Driver.GPIO.Out
11+
)
12+
13+
target_include_directories(lib_simulation_button
14+
PRIVATE
15+
include
16+
INTERFACE
17+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
18+
$<INSTALL_INTERFACE:include/platform>
19+
)
20+
21+
mikrosdk_install(MikroSDK.Simulation.Button)
22+
install_headers(${CMAKE_INSTALL_PREFIX}/include/platform MikroSDK.Simulation.Button include/simulation_button.h)

0 commit comments

Comments
 (0)