1
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Janez
82c95a2bc9 Format comments in the .c files. 2024-07-06 21:48:21 +02:00
Janez
95c1705e76 Format the .c files using clang-format v15. 2024-07-06 19:57:06 +02:00
Janez
0d016a0019 Remove /*********...*/ comment delimiters. 2024-07-06 18:53:40 +02:00
Janez
f064eeaa40 Format the license information in files. 2024-07-06 13:03:00 +02:00
temi54c1l8
675d11a33d CO_fifo: static analysis: format '%02X' specifies type 'unsigned int' which is nominally inconsistent with argument no. 3 of promoted type 'int' 2024-06-27 16:54:42 +02:00
temi54c1l8
86a5064e2f CO_fifo: static analisys: use of modifier or type outside of a typedef [MISRA 2012 Directive 4.6, advisory] 2024-06-27 16:43:00 +02:00
temi54c1l8
1c4a5f6877 CO_fifo: static analysis: multiple loop exits [MISRA 2012 Rule 15.4, advisory] 2024-06-27 13:31:08 +02:00
temi54c1l8
4a8c750cbf CO_fifo: static analysis: repeated include file 'string.h' 2024-06-26 15:40:05 +02:00
temi54c1l8
5749014c16 CO_fifo: static analysis: pointer subtraction [MISRA 2012 Rule 18.2, required] 2024-06-26 15:36:31 +02:00
temi54c1l8
36f7481778 CO_fifo: static analysis: no 'else' at end of 'if ... else if' chain [MISRA 2012 Rule 15.7, required] 2024-06-26 13:38:38 +02:00
temi54c1l8
8c36f03fc6 CO_fifo: static analysis: cannot assign value to different essential type [MISRA 2012 Rule 10.3, required] 2024-06-26 13:35:26 +02:00
temi54c1l8
a5004f4649 CO_fifo: static analysis: result of assignment operator used in right operand to '=' operator [MISRA 2012 Rule 13.4, advisory] 2024-06-26 13:14:11 +02:00
temi54c1l8
f6535def56 CO_fifo: static analysis: increment/decrement operation combined with other operation with side-effects [MISRA 2012 Rule 13.3, advisory] 2024-06-26 13:13:54 +02:00
temi54c1l8
376d86a5a4 CO_fifo: static analysis: side effects on right hand of logical operator, '||' [MISRA 2012 Rule 13.5, required]
(cherry picked from commit ea89548ebae934dc3acbcfd6fea15107389f8fd7)
2024-06-26 13:02:51 +02:00
temi54c1l8
c46bb96292 CO_fifo: static analysis: side effects on right hand of logical operator, '&&' [MISRA 2012 Rule 13.5, required]
(cherry picked from commit bd20c9d7dcf935bc81fb70d0a82df14f9c4442d5)
2024-06-26 13:02:36 +02:00
temi54c1l8
4bef46fb46 CO_fifo: static analysis: refactoring CO_fifo_readToken for loss of sign 2024-06-26 11:43:41 +02:00
temi54c1l8
d96ac7719e CO_fifo: static analysis: body should be a compound statement [MISRA 2012 Rule 15.6, required] 2024-06-26 11:00:19 +02:00
temi54c1l8
29156e8ed7 CO_fifo: static analysis: refactoring changed enum with define to be able to use bitwise operators 2024-06-26 10:48:52 +02:00
temi54c1l8
1e9b6da4f3 CO_fifo: static analysis: ignoring return value of functions [MISRA 2012 Directive 4.7, required], [MISRA 2012 Rule 17.7, required] 2024-06-26 10:33:50 +02:00
temi54c1l8
d4e7214f4d static analysis: conditional of #if does not evaluate to 0 or 1 [MISRA 2012 Rule 20.8, required] 2024-06-12 09:09:12 +02:00
temi54c1l8
0142f41857 static analysis: an enum value is not an appropriate left operand [MISRA 2012 Rule 10.1, required] 2024-06-10 17:59:05 +02:00
temi54c1l8
446925be63 static analysis: add 'U' of unsigned [MISRA 2012 Rule 10.4, required] 2024-06-10 17:57:42 +02:00
temi54c1l8
dc10900ad5 static analysis: Aggiunte parentesi per la dipendenza posta sulla precedenza dell'operatore [MISRA 2012 Rule 12.1, advisory] 2024-06-10 14:39:05 +02:00
Brian Linari
a52db428f6
Misra (#501)
Make MISRA compliant for:
MISRA C 2004 rule 14.10
MISRA C 2004 rule 14.9
MISRA C 2004 rule 13.1
MISRA C 2004 rule 15.3

MISRA style guild update
2024-03-13 17:20:42 +01:00
Julien PEYREGNE
b7aaaa167b Fix snprintf float to double warning 2021-03-22 16:23:03 +01:00
Janez
267a2dafb2 Replace type char with uint8_t or int8_t, where appropriate
305/CO_LSS.h now passing -Wextra warnings
2021-01-05 09:22:19 +01:00
Janez
9e9fce74a9 Updates and testing of OD interface, SDO server, SDO client, gateway, etc.
- SDO server: Change behavior for string data type + fixes + test all
- SDO client: fixes + test all
- OD interface: Special behavior for string data type
- CO_driver.h: added default debug configuration macros + fix spelling
- Gateway + fifo: added base64 support + updates
- CO_CANopenInit() - added arguments.
- update some documentation
- CO_epoll_interface fixes.
- CO_main_basic.c updates
2020-12-24 14:15:10 +01:00
Janez
a528eb1669 Better organised configuration macros (CO_config.h):
- rearranged and better documented
 - default values moved from CO_driver.h into appropriate files
 - rearranged also in CO_driver_target.h files
 - parts of the stack or whole objects can be disabled.
 - configuration is verified for depencies

Additional:
 - renamed some members of CO_Default_CAN_ID_t
 - moved helpers CO_setUint32() etc from CO_SDOserver.h into CO_driver.h.
 - change wrong CO_ERROR_PARAMETERS to CO_ERROR_ILLEGAL_ARGUMENT.
 - renamed CO_ERROR_PARAMETERS to CO_ERROR_OD_PARAMETERS
2020-09-14 15:50:21 +02:00
Janez
8783bfff05 use crc16-ccitt.h in CO_fifo.c
It was duplicated.
Commited also some small changes + ODinterface
2020-08-04 23:39:25 +02:00
Norcio
03df5f65b8
fix for missing int cast which cause compilation warning/error when ctype,__cplusplus and esp32 is used (#212)
error: array subscript has type 'char' [-Werror=char-subscripts]
2020-07-22 07:31:56 +02:00
Janez
cb9b2cce42 Add printout of message log from CANopen gateway-ascii (non-standard). 2020-05-29 07:36:23 +02:00
Janez
f41069561a Make SDO client and NMT master optional in gateway_ascii 2020-05-28 16:40:21 +02:00
Janez
c1a30b8a03 Some style corrections
- add CO_fifo_st enumerator for use in CO_fifo_cpyTok2xx functions.
- 309/CO_gateway_ascii: add x8 to x64 nonstandard data types
- example compiles now
- Fix "unused argument" warnings in socketCAN
2020-05-15 15:52:22 +02:00
Freddie Chopin
d272934647
Fix new -Wextra warnings (#185)
* Fix new "unused argument" warnings

* Fix "variable may be used uninitialized" in CO_process_SYNC()

With enabled optimization compiler reports:

CANopen.c: In function ‘CO_process_SYNC’:
CANopen.c:890:12: warning: ‘syncWas’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
  890 |     return syncWas;
      |            ^~~~~~~
2020-05-14 16:23:02 +02:00
Janez
b5bfeec42a Added CANopen gateway-ascii command interface according to CiA309-3 as a
microcontroller independent module.
It includes NMT master, LSS master and SDO client interface.
Interface is non-blocking, it is added to mainline.
Example for Linux stdio and socket is included.

Added CO_fifo.h/c for fifo data buffer, used with rewritten SDO client, etc

SDO client is rewritten. Now includes r/w fifo interface to transfer data.

doc/gettingStarted.md is updated.
2020-05-12 18:11:43 +02:00