1
0
Fork 0
Commit graph

75 commits

Author SHA1 Message Date
Janez
f064eeaa40 Format the license information in files. 2024-07-06 13:03:00 +02:00
Janez
fcd89f87de Remove comments from arguments in CO_CANrxBufferInit and CO_CANtxBufferInit 2024-07-05 18:38:01 +02:00
Janez
7db21c1f91 CO_SDO_server.c fix missing "bufShifted" 2024-07-05 11:14:37 +02:00
temi54c1l8
5cf08656e1 Fix commit 29bb7992d2 won't respond with abort message, if segmented transfer is not supported 2024-06-26 08:50:45 +02:00
temi54c1l8
f7c7f9c104 Add more static analysis and MISRA.md
(cherry picked from commit ad337c3e9c4e879721ec432bc9a5d9a84a53c573)

# Conflicts:
#	CANopen.c
2024-06-24 17:46:34 +02:00
temi54c1l8
f9d8bdeff3 static analysys: local variable 'data' could be pointer to const [MISRA 2012 Rule 8.13, advisory]
refactory CO_CANrxMsg_readData return const
2024-06-14 11:27:22 +02:00
temi54c1l8
d2770c4917 CO_SDOserver: static analysis: named parameter 'calculateCrc' of 'non-virtual' function 'readFromOd' not subsequently referenced [MISRA 2012 Rule 2.7, advisory] 2024-06-14 11:15:41 +02:00
temi54c1l8
29bb7992d2 CO_SDOserver: static analysis: enum constants not used within default switch 2024-06-14 09:49:21 +02:00
temi54c1l8
cbf3df74e9 CO_SDOserver: static analysis: result of assignment operator used in right operand to '=' operator [MISRA 2012 Rule 13.4, advisory] 2024-06-14 09:47:16 +02:00
temi54c1l8
06834c1d14 O_SDOserver: static analysis: side effects on right hand of logical operator, '&&' [MISRA 2012 Rule 13.5, required]
because SDO->state is volatile
2024-06-14 09:02:17 +02:00
temi54c1l8
35cefe09c3 CO_SDOserver: static analysis: cannot cast 'unsigned8' to wider essential type 'unsigned32' [MISRA 2012 Rule 10.8, required] 2024-06-14 08:52:07 +02:00
temi54c1l8
8af3ef3c6b CO_SDOserver: static analysis: taking address of array 2024-06-14 08:26:34 +02:00
temi54c1l8
99b56d10c9 CO_SDOserver: static analysis: unexpected lack of indentation 2024-06-13 13:21:20 +02:00
temi54c1l8
e82c942846 Fix previous static analysis 2024-06-13 13:18:02 +02:00
temi54c1l8
00f8961f55 CO_SDOserver: static analysis: loss of precision (assignment) from 32 bits to 8 bits 2024-06-13 13:16:22 +02:00
temi54c1l8
404ebca5fb CO_SDOserver: static analysis: cannot assign a composite expression of type 'unsigned8' to an object of wider type 'unsigned32' [MISRA 2012 Rule 10.6, required] 2024-06-13 13:14:00 +02:00
temi54c1l8
a4fb95e38b CO_SDOserver: static analysis: statement or comment should appear in default case [MISRA 2012 Rule 16.1, required], [MISRA 2012 Rule 16.4, required] 2024-06-13 13:11:09 +02:00
temi54c1l8
b2294a65ab CO_SDOserver: static analysis: argument 1 of type 'uint8_t *' (aka 'unsigned char *') is not compatible with argument 2 of type 'uint32_t *' (aka 'unsigned int *') in call to function 'memcpy' 2024-06-13 13:09:34 +02:00
temi54c1l8
460441f972 CO_SDOserve: static analysis: increment/decrement operation combined with other operation with side-effects [MISRA 2012 Rule 13.3, advisory] 2024-06-13 12:29:43 +02:00
temi54c1l8
f8d10390bc CO_SDOserver: static analysis: missing unconditional break from final switch case [MISRA 2012 Rule 16.1, required], [MISRA 2012 Rule 16.3, required] 2024-06-13 12:27:50 +02:00
temi54c1l8
686ab04ee9 static analysis: enumerator 'CO_CAN_ID_EMERGENCY' reuses the constant value '128' previously used by enumerator 'CO_CAN_ID_SYNC'
refactoring changed enum with define
2024-06-12 14:26:51 +02:00
temi54c1l8
691728f71a static analysis: essential type of condition of 'if' statement is in not correct [MISRA 2012 Rule 14.4, required] 2024-06-12 13:57:42 +02:00
temi54c1l8
6e009c0893 static analysis: cannot assign 'signed8' to different essential type 'boolean' [MISRA 2012 Rule 10.3, required] 2024-06-12 10:42:40 +02:00
temi54c1l8
9e8ceb4dfa static analysis: ignoring return value of functions [MISRA 2012 Directive 4.7, required] 2024-06-12 10:13:45 +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
temi54c1l8
187650d073 static analysis: Ignoring return value of function 'memmove' [MISRA 2012 Directive 4.7, required] 2024-06-10 11:58:55 +02:00
temi54c1l8
e3206f2c7f static analysis: Ignoring return value of function 'memset' [MISRA 2012 Directive 4.7, required] 2024-06-10 11:56:47 +02:00
temi54c1l8
ddaa8974f1 static analysis: Ignoring return value of function 'memcpy' [MISRA 2012 Directive 4.7, required] 2024-06-10 10:30:59 +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
mlout
4ab0bd10c1 Always call OD lock macros on SDO operations 2023-03-17 17:42:35 +01:00
mlout
900ab00a79 Rename CO_CONFIG_FLAG_ALWAYS_LOCK_OD to CO_CONFIG_FLAG_SDO_ALWAYS_LOCK_OD 2023-03-16 14:19:07 +01:00
mlout
d8a637dbc5 Add CO_CONFIG_FLAG_ALWAYS_LOCK_OD to always lock OD
Add CO_CONFIG_FLAG_ALWAYS_LOCK_OD which can be used to lock the OD for
every SDO read/write operation.
Modify the code in CO_SDOserver.c and CO_SDOclient.c to check this
config flag.
2023-03-16 14:09:01 +01:00
ankit.chudasama1
4c86a61342 Fix variable name and use of pointer for big endian system
1. Variable name update in CO_PDO.c file
2. Correct use of pointer in the CO_SDOserver.c file
2023-02-16 19:36:49 +05:30
Janez
fe3777b781 Verify for restricted CAN-IDs in SYNC, TIME, EMCY, PDO and SDO COB-ID configuration. 2021-08-09 14:12:19 +02:00
Janez
bb74ed2cf5 SDO server: send abort on wrong block size 2021-08-09 14:00:45 +02:00
Janez
b4ddf9be32 Fixed SDO server
- Missing break
- expedited transfer: always copied fixed amount of data instead of actual data size.
2021-08-09 13:56:05 +02:00
gotocoffee1
591a91be29 fixed some warnings
fixed some small bugs
2021-04-27 16:24:00 +02:00
Julien PEYREGNE
877edc50a8 Reduce variable scope 2021-03-19 09:54:17 +01:00
Julien PEYREGNE
b6f04d65f8 Fix null pointer dereference warnings 2021-03-19 09:54:17 +01:00
Janez
f8eb4bc0a1 CO_ODinterface: simplified API to read/write functions. Return variables changed. 2021-03-12 11:42:34 +01:00
Janez
5b8be4ef7e CO_ODinterface: simplified API to read/write functions. subIndex moved to OD_stream_t. 2021-03-10 15:22:03 +01:00
Janez
fc81777097 Pass CO_CANmodule_t argument to all the CO_LOCK_...() and CO_UNLOCK_...() macros.
https://github.com/CANopenNode/CANopenNode/issues/162#issuecomment-777438875
2021-03-02 21:28:22 +01:00
Koen Dergent
9f88191767 only use SDO segmented fields when enabled 2021-02-18 10:29:39 +01:00
Janez
88558203a0 Linux socketCAN driver, fix CANsend().
There was a problem with block transfer, when transmitting sequence of
data. If CANsend() failed (socket buffer full), message was dropped.
Now dropped message is marked with bufferFull flag and then it is
re-transmitted later by the driver, as is in the original behaviour of
CANopenNode. Same as commit acd719e27 in v2.0.
2021-02-08 17:01:55 +01:00
Janez
5538b5e1f8 Remove CO_errinfo() from driver and put errInfo into CO_CANopenInit() as arg 2021-01-20 12:49:20 +01:00
Janez
51d64df860 OD interface simplified #162
OD_extension is now configurable by application only.
2021-01-07 08:34:53 +01:00
Janez
7b5de9f383 Replace type char with uint8_t, where appropriate.
Fix typos and clarify CO_ODinterface.
Remove unnecessary types from CO_driver.h.
2021-01-05 12:27:22 +01:00