Skip to content

Commit

Permalink
Merge pull request MikroElektronika#44 from MikroElektronika/stefan.f…
Browse files Browse the repository at this point in the history
…ilipovic/18week2023

sync click boards to week 18 of 2023
  • Loading branch information
StefanFilipovic15 authored May 8, 2023
2 parents b6d2620 + daedf84 commit 55f8ec1
Show file tree
Hide file tree
Showing 225 changed files with 24,506 additions and 8,220 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

**Updates by date of commit:**

+ **[20230505](#20230505)**
+ **[20230428](#20230428)**
+ **[20230421](#20230421)**
+ **[20230413](#20230413)**
Expand Down Expand Up @@ -46,6 +47,32 @@
---
---

## `20230505`

*Following click boards have been added:*

+ `LED Driver 17`
+ `RS485 7`
+ `AWS IoT`
+ `Magnetic Rotary 5`

*Following click boards have been updated:*

+ `3D Hall 2`
+ `3G SARA`
+ `3G-EA`
+ `3G-AA`
+ `4x4 RGB`
+ `6DOF IMU 17`
+ `7-SEG RGB`
+ `AC Current`
+ `Accel 15`
+ `Accel 16`

**[BACK TO TOP](#changelog)**

---

## `20230428`

*Following click boards have been added:*
Expand Down
756 changes: 379 additions & 377 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clicks/3dhall2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Changelog

### Version 2.0.0.8
### Version 2.1.0.8
- Initial release
27 changes: 27 additions & 0 deletions clicks/3dhall2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.21)
if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
project(example_c3dhall2 LANGUAGES MikroC)
else()
project(example_c3dhall2 LANGUAGES C ASM)
endif()

if (NOT PROJECT_TYPE)
set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
endif()

add_executable(example_c3dhall2
example/main.c

)


############################ example_c3dhall2 GENERATED CODE START ###########################
find_package(MikroC.Core REQUIRED)
target_link_libraries(example_c3dhall2 PUBLIC MikroC.Core)
find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_c3dhall2 PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_c3dhall2 PUBLIC MikroSDK.Log)
add_subdirectory(lib_c3dhall2)
target_link_libraries(example_c3dhall2 PUBLIC Click.3dHall2)
############################ example_c3dhall2 GENERATED CODE END ###########################
72 changes: 42 additions & 30 deletions clicks/3dhall2/DETAILS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


---
# 3D Hall 2 click

Expand All @@ -23,7 +22,7 @@

# Software Support

We provide a library for the C3dHall2 Click
We provide a library for the 3d Hall 2 Click
as well as a demo application (example), developed using MikroElektronika
[compilers](https://shop.mikroe.com/compilers).
The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
Expand All @@ -32,29 +31,41 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)

## Library Description

> This library contains API for C3dHall2 Click driver.
> This library contains API for 3d Hall 2 Click driver.
#### Standard key functions :

- Config Object Initialization function.
> void c3dhall2_cfg_setup ( c3dhall2_cfg_t *cfg );
- Initialization function.
> C3DHALL2_RETVAL c3dhall2_init ( c3dhall2_t *ctx, c3dhall2_cfg_t *cfg );
- `c3dhall2_cfg_setup` Config Object Initialization function.
```c
void c3dhall2_cfg_setup ( c10x10rgb_cfg_t *cfg );
```
#### Example key functions :
- `c3dhall2_init` Initialization function.
```c
err_t c3dhall2_init ( c3dhall2_t *ctx, c3dhall2_cfg_t *cfg );
```

- `c3dhall2_default_cfg` Default configuration initialization function.
```c
err_t c3dhall2_default_cfg( c3dhall2_t *ctx );
```
- This function reads data from register.
> void c3dhall2_read_data ( c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len );
#### Example key functions :
- This function gets temperature and axis data.
> void c3dhall2_get_axis_temp_data ( c3dhall2_t *ctx, float *axis_data, float *temp_data );
- `c3dhall2_read_data` This function reads data from register.
```c
err_t c3dhall2_read_data ( c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len );
```

- This function configures the chip for measurement.
> void c3dhall2_configuration( c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2);
- `c3dhall2_get_axis_temp_data` This function gets temperature and axis data.
```c
err_t c3dhall2_get_axis_temp_data ( c3dhall2_t *ctx, float *axis_data, float *temp_data );
```
- `c3dhall2_configuration` This function configures the chip for measurement.
```c
err_t c3dhall2_configuration ( c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2 );
```

## Examples Description

Expand All @@ -64,13 +75,14 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)

### Application Init

> Initialization driver init and configuration chip.
> Initializes the driver and configures the click board.
```c

void application_init ( void )
{
c3dhall2_cfg_t cfg;
log_cfg_t log_cfg;
c3dhall2_cfg_t cfg;

/**
* Logger initialization.
Expand All @@ -86,7 +98,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );

// Click initialization.

c3dhall2_cfg_setup( &cfg );
C3DHALL2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
c3dhall2_init( &c3dhall2, &cfg );
Expand All @@ -97,21 +108,22 @@ void application_init ( void )
### Application Task
> Reads X/Y/Z hall axis and Temperature data and logs values every 3 seconds.
> Reads X/Y/Z hall axis and Temperature data. All data logs on the USBUART every 200ms.
```c
void application_task ( void )
{
c3dhall2_get_axis_temp_data( &c3dhall2, &xyz_axis[ 0 ], &temperature );
log_printf( &logger, " Axis X: %.2f mT\r\n", xyz_axis[ 0 ] );
log_printf( &logger, " Axis Y: %.2f mT\r\n", xyz_axis[ 1 ] );
log_printf( &logger, " Axis Z: %.2f mT\r\n", xyz_axis[ 2 ] );
log_printf( &logger, " Temperature: %.2f C\r\n", temperature );
Delay_ms( 3000 );
float xyz_axis[ 3 ] = { 0 };
float temperature = 0;
if ( C3DHALL2_OK == c3dhall2_get_axis_temp_data( &c3dhall2, &xyz_axis[ 0 ], &temperature ) )
{
log_printf( &logger, " Axis X: %.2f mT\r\n", xyz_axis[ 0 ] );
log_printf( &logger, " Axis Y: %.2f mT\r\n", xyz_axis[ 1 ] );
log_printf( &logger, " Axis Z: %.2f mT\r\n", xyz_axis[ 2 ] );
log_printf( &logger, " Temperature: %.2f C\r\n\n", temperature );
Delay_ms( 200 );
}
}
```
Expand All @@ -122,7 +134,7 @@ The full application code, and ready to use projects can be installed directly

- MikroSDK.Board
- MikroSDK.Log
- Click.C3dHall2
- Click.3dHall2

**Additional notes and informations**

Expand Down
73 changes: 42 additions & 31 deletions clicks/3dhall2/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
\mainpage Main Page



---
# 3D Hall 2 click

Expand All @@ -25,7 +23,7 @@

# Software Support

We provide a library for the C3dHall2 Click
We provide a library for the 3d Hall 2 Click
as well as a demo application (example), developed using MikroElektronika
[compilers](https://shop.mikroe.com/compilers).
The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
Expand All @@ -34,29 +32,41 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)

## Library Description

> This library contains API for C3dHall2 Click driver.
> This library contains API for 3d Hall 2 Click driver.
#### Standard key functions :

- Config Object Initialization function.
> void c3dhall2_cfg_setup ( c3dhall2_cfg_t *cfg );
- Initialization function.
> C3DHALL2_RETVAL c3dhall2_init ( c3dhall2_t *ctx, c3dhall2_cfg_t *cfg );
- `c3dhall2_cfg_setup` Config Object Initialization function.
```c
void c3dhall2_cfg_setup ( c10x10rgb_cfg_t *cfg );
```
#### Example key functions :
- `c3dhall2_init` Initialization function.
```c
err_t c3dhall2_init ( c3dhall2_t *ctx, c3dhall2_cfg_t *cfg );
```

- `c3dhall2_default_cfg` Default configuration initialization function.
```c
err_t c3dhall2_default_cfg( c3dhall2_t *ctx );
```
- This function reads data from register.
> void c3dhall2_read_data ( c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len );
#### Example key functions :
- This function gets temperature and axis data.
> void c3dhall2_get_axis_temp_data ( c3dhall2_t *ctx, float *axis_data, float *temp_data );
- `c3dhall2_read_data` This function reads data from register.
```c
err_t c3dhall2_read_data ( c3dhall2_t *ctx, uint8_t *data_buf, uint16_t len );
```

- This function configures the chip for measurement.
> void c3dhall2_configuration( c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2);
- `c3dhall2_get_axis_temp_data` This function gets temperature and axis data.
```c
err_t c3dhall2_get_axis_temp_data ( c3dhall2_t *ctx, float *axis_data, float *temp_data );
```
- `c3dhall2_configuration` This function configures the chip for measurement.
```c
err_t c3dhall2_configuration ( c3dhall2_t *ctx, uint8_t settings1, uint8_t settings2 );
```

## Examples Description

Expand All @@ -66,13 +76,14 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)

### Application Init

> Initialization driver init and configuration chip.
> Initializes the driver and configures the click board.
```c

void application_init ( void )
{
c3dhall2_cfg_t cfg;
log_cfg_t log_cfg;
c3dhall2_cfg_t cfg;

/**
* Logger initialization.
Expand All @@ -88,7 +99,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );

// Click initialization.

c3dhall2_cfg_setup( &cfg );
C3DHALL2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
c3dhall2_init( &c3dhall2, &cfg );
Expand All @@ -99,21 +109,22 @@ void application_init ( void )
### Application Task
> Reads X/Y/Z hall axis and Temperature data and logs values every 3 seconds.
> Reads X/Y/Z hall axis and Temperature data. All data logs on the USBUART every 200ms.
```c
void application_task ( void )
{
c3dhall2_get_axis_temp_data( &c3dhall2, &xyz_axis[ 0 ], &temperature );
log_printf( &logger, " Axis X: %.2f mT\r\n", xyz_axis[ 0 ] );
log_printf( &logger, " Axis Y: %.2f mT\r\n", xyz_axis[ 1 ] );
log_printf( &logger, " Axis Z: %.2f mT\r\n", xyz_axis[ 2 ] );
log_printf( &logger, " Temperature: %.2f C\r\n", temperature );
Delay_ms( 3000 );
float xyz_axis[ 3 ] = { 0 };
float temperature = 0;
if ( C3DHALL2_OK == c3dhall2_get_axis_temp_data( &c3dhall2, &xyz_axis[ 0 ], &temperature ) )
{
log_printf( &logger, " Axis X: %.2f mT\r\n", xyz_axis[ 0 ] );
log_printf( &logger, " Axis Y: %.2f mT\r\n", xyz_axis[ 1 ] );
log_printf( &logger, " Axis Z: %.2f mT\r\n", xyz_axis[ 2 ] );
log_printf( &logger, " Temperature: %.2f C\r\n\n", temperature );
Delay_ms( 200 );
}
}
```
Expand All @@ -124,7 +135,7 @@ The full application code, and ready to use projects can be installed directly

- MikroSDK.Board
- MikroSDK.Log
- Click.C3dHall2
- Click.3dHall2

**Additional notes and informations**

Expand Down
Loading

0 comments on commit 55f8ec1

Please sign in to comment.