Skip to content

Commit

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

sync click boards to week 27 of 2023
  • Loading branch information
StefanFilipovic15 authored Jul 6, 2023
2 parents ea8217f + 6817c9b commit d22d8d4
Show file tree
Hide file tree
Showing 183 changed files with 20,685 additions and 6,363 deletions.
26 changes: 26 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:**

+ **[20230706](#20230706)**
+ **[20230630](#20230630)**
+ **[20230622](#20230622)**
+ **[20230616](#20230616)**
Expand Down Expand Up @@ -55,6 +56,31 @@
---
---

## `20230706`

*Following click boards have been added:*

+ `HOD CAP`
+ `RS485 8`
+ `Smart Buck 4`
+ `USB MUX`

*Following click boards have been updated:*

+ `Thingstream`
+ `Motion`
+ `WiFi ESP`
+ `FT`
+ `Current 7`
+ `Diff pressure`
+ `CAN FD 6`
+ `WiFi 8`
+ `eFuse 7`

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

---

## `20230630`

*Following click boards have been added:*
Expand Down
568 changes: 285 additions & 283 deletions README.md

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions clicks/canfd6/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_canfd6 LANGUAGES MikroC)
else()
project(example_canfd6 LANGUAGES C ASM)
endif()

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

add_executable(example_canfd6
example/main.c

)


############################ example_canfd6 GENERATED CODE START ###########################
find_package(MikroC.Core REQUIRED)
target_link_libraries(example_canfd6 PUBLIC MikroC.Core)
find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_canfd6 PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_canfd6 PUBLIC MikroSDK.Log)
add_subdirectory(lib_canfd6)
target_link_libraries(example_canfd6 PUBLIC Click.CANFD6)
############################ example_canfd6 GENERATED CODE END ###########################
40 changes: 20 additions & 20 deletions clicks/canfd6/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
\mainpage Main Page


---
# CAN FD 6 click

CAN FD 6 Click is a compact add-on board containing a CAN transceiver that supports CAN and CAN FD protocols. This board features the TCAN4550, a CAN FD controller that provides an interface between the CAN bus and the CAN protocol controller up to 5 megabits per second (Mbps) from Texas Instruments.
> CAN FD 6 Click is a compact add-on board containing a CAN transceiver that supports CAN and CAN FD protocols. This board features the TCAN4550, a CAN FD controller that provides an interface between the CAN bus and the CAN protocol controller up to 5 megabits per second (Mbps) from Texas Instruments.
<p align="center">
<img src="https://download.mikroe.com/images/click_for_ide/canfd6_click.png" height=300px>
Expand Down Expand Up @@ -44,7 +43,7 @@ void canfd6_cfg_setup ( canfd6_cfg_t *cfg );
- `canfd6_init` Initialization function.
```c
CANFD6_RETVAL canfd6_init ( canfd6_t *ctx, canfd6_cfg_t *cfg );
err_t canfd6_init ( canfd6_t *ctx, canfd6_cfg_t *cfg );
```

- `canfd6_default_cfg` Click Default Configuration function.
Expand Down Expand Up @@ -99,7 +98,6 @@ void application_init ( void ) {
log_info( &logger, " Application Init " );

// Click initialization.

canfd6_cfg_setup( &canfd6_cfg );
CANFD6_MAP_MIKROBUS( canfd6_cfg, MIKROBUS_1 );
err_t init_flag = canfd6_init( &canfd6, &canfd6_cfg );
Expand All @@ -112,7 +110,10 @@ void application_init ( void ) {

canfd6_default_cfg( &canfd6 );
Delay_ms( 100 );

#ifdef DEMO_APP_TRANSMITTER
canfd6_mcan_tx_header_t canfd6_header = { 0 };
uint8_t data_send_buf[ 64 ] = { 0 };
strcpy ( data_send_buf, "MIKROE" );
canfd6_header.DLC = CANFD6_MCAN_DLC_6B;
canfd6_header.ID = 0x123;
canfd6_header.FDF = 1;
Expand All @@ -124,11 +125,8 @@ void application_init ( void ) {
canfd6_header.ESI = 0;
canfd6_mcan_write_txbuffer( &canfd6, CANFD6_FIRST_MSG, &canfd6_header, data_send_buf );

data_send_buf[ 0 ] = '2';
data_send_buf[ 1 ] = '0';
data_send_buf[ 2 ] = '2';
data_send_buf[ 3 ] = '1';
canfd6_header.DLC = CANFD6_MCAN_DLC_4B;
strcpy ( data_send_buf, "CAN FD 6 click board" );
canfd6_header.DLC = CANFD6_MCAN_DLC_20B;
canfd6_header.ID = 0x456;
canfd6_header.FDF = 1;
canfd6_header.BRS = 1;
Expand All @@ -138,8 +136,10 @@ void application_init ( void ) {
canfd6_header.XTD = 0;
canfd6_header.ESI = 0;
canfd6_mcan_write_txbuffer( &canfd6, CANFD6_SECOND_MSG, &canfd6_header, data_send_buf );

Delay_ms( 100 );
log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
log_info( &logger, " Application Task " );
}

Expand All @@ -152,14 +152,14 @@ void application_init ( void ) {
```c
void application_task ( void ) {
#ifdef APP_TRANSMITTER
#ifdef DEMO_APP_TRANSMITTER
log_printf( &logger, " Transmit first message\r\n" );
canfd6_mcan_transmit_buffer_contents( &canfd6, CANFD6_FIRST_MSG );
Delay_ms( 1000 );
Delay_ms( 2000 );
log_printf( &logger, " Transmit second message\r\n" );
canfd6_mcan_transmit_buffer_contents( &canfd6, CANFD6_SECOND_MSG );
Delay_ms( 3000 );
#endif
#ifdef APP_RECEIVER
Delay_ms( 2000 );
#else
uint8_t cnt = 0;
if ( !canfd6_get_int_pin( &canfd6 ) ) {
canfd6_device_interrupts_t canfd6_dev_ir = { 0 };
Expand All @@ -180,7 +180,7 @@ void application_task ( void ) {
num_bytes = canfd6_mcan_read_nextfifo( &canfd6, CANFD6_RXFIFO0, &canfd6_msg_header, data_payload );
log_printf( &logger, "Message received ID[ 0x%X ]: ", canfd6_msg_header.ID );
log_printf( &logger, " Message received ID[ 0x%X ]: ", canfd6_msg_header.ID );
while ( cnt < 64 ) {
if ( data_payload[ cnt ] ) {
Expand All @@ -193,7 +193,7 @@ void application_task ( void ) {
}
}
}
#endif
#endif
}
```
Expand Down
2 changes: 1 addition & 1 deletion clicks/canfd6/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Changelog

### Version 2.0.0.4
### Version 2.1.0.4
- Initial release
39 changes: 20 additions & 19 deletions clicks/canfd6/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
# CAN FD 6 click

CAN FD 6 Click is a compact add-on board containing a CAN transceiver that supports CAN and CAN FD protocols. This board features the TCAN4550, a CAN FD controller that provides an interface between the CAN bus and the CAN protocol controller up to 5 megabits per second (Mbps) from Texas Instruments.
> CAN FD 6 Click is a compact add-on board containing a CAN transceiver that supports CAN and CAN FD protocols. This board features the TCAN4550, a CAN FD controller that provides an interface between the CAN bus and the CAN protocol controller up to 5 megabits per second (Mbps) from Texas Instruments.
<p align="center">
<img src="https://download.mikroe.com/images/click_for_ide/canfd6_click.png" height=300px>
Expand Down Expand Up @@ -42,7 +42,7 @@ void canfd6_cfg_setup ( canfd6_cfg_t *cfg );
- `canfd6_init` Initialization function.
```c
CANFD6_RETVAL canfd6_init ( canfd6_t *ctx, canfd6_cfg_t *cfg );
err_t canfd6_init ( canfd6_t *ctx, canfd6_cfg_t *cfg );
```

- `canfd6_default_cfg` Click Default Configuration function.
Expand Down Expand Up @@ -97,7 +97,6 @@ void application_init ( void ) {
log_info( &logger, " Application Init " );

// Click initialization.

canfd6_cfg_setup( &canfd6_cfg );
CANFD6_MAP_MIKROBUS( canfd6_cfg, MIKROBUS_1 );
err_t init_flag = canfd6_init( &canfd6, &canfd6_cfg );
Expand All @@ -110,7 +109,10 @@ void application_init ( void ) {

canfd6_default_cfg( &canfd6 );
Delay_ms( 100 );

#ifdef DEMO_APP_TRANSMITTER
canfd6_mcan_tx_header_t canfd6_header = { 0 };
uint8_t data_send_buf[ 64 ] = { 0 };
strcpy ( data_send_buf, "MIKROE" );
canfd6_header.DLC = CANFD6_MCAN_DLC_6B;
canfd6_header.ID = 0x123;
canfd6_header.FDF = 1;
Expand All @@ -122,11 +124,8 @@ void application_init ( void ) {
canfd6_header.ESI = 0;
canfd6_mcan_write_txbuffer( &canfd6, CANFD6_FIRST_MSG, &canfd6_header, data_send_buf );

data_send_buf[ 0 ] = '2';
data_send_buf[ 1 ] = '0';
data_send_buf[ 2 ] = '2';
data_send_buf[ 3 ] = '1';
canfd6_header.DLC = CANFD6_MCAN_DLC_4B;
strcpy ( data_send_buf, "CAN FD 6 click board" );
canfd6_header.DLC = CANFD6_MCAN_DLC_20B;
canfd6_header.ID = 0x456;
canfd6_header.FDF = 1;
canfd6_header.BRS = 1;
Expand All @@ -136,8 +135,10 @@ void application_init ( void ) {
canfd6_header.XTD = 0;
canfd6_header.ESI = 0;
canfd6_mcan_write_txbuffer( &canfd6, CANFD6_SECOND_MSG, &canfd6_header, data_send_buf );

Delay_ms( 100 );
log_printf( &logger, " Application Mode: Transmitter\r\n" );
#else
log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
log_info( &logger, " Application Task " );
}

Expand All @@ -150,14 +151,14 @@ void application_init ( void ) {
```c
void application_task ( void ) {
#ifdef APP_TRANSMITTER
#ifdef DEMO_APP_TRANSMITTER
log_printf( &logger, " Transmit first message\r\n" );
canfd6_mcan_transmit_buffer_contents( &canfd6, CANFD6_FIRST_MSG );
Delay_ms( 1000 );
Delay_ms( 2000 );
log_printf( &logger, " Transmit second message\r\n" );
canfd6_mcan_transmit_buffer_contents( &canfd6, CANFD6_SECOND_MSG );
Delay_ms( 3000 );
#endif
#ifdef APP_RECEIVER
Delay_ms( 2000 );
#else
uint8_t cnt = 0;
if ( !canfd6_get_int_pin( &canfd6 ) ) {
canfd6_device_interrupts_t canfd6_dev_ir = { 0 };
Expand All @@ -178,7 +179,7 @@ void application_task ( void ) {
num_bytes = canfd6_mcan_read_nextfifo( &canfd6, CANFD6_RXFIFO0, &canfd6_msg_header, data_payload );
log_printf( &logger, "Message received ID[ 0x%X ]: ", canfd6_msg_header.ID );
log_printf( &logger, " Message received ID[ 0x%X ]: ", canfd6_msg_header.ID );
while ( cnt < 64 ) {
if ( data_payload[ cnt ] ) {
Expand All @@ -191,7 +192,7 @@ void application_task ( void ) {
}
}
}
#endif
#endif
}
```
Expand Down
Loading

0 comments on commit d22d8d4

Please sign in to comment.