bertos.git
14 years agosam3n port: fix integer comparison in clock initialization
aleph [Wed, 29 Sep 2010 13:59:39 +0000 (13:59 +0000)]
sam3n port: fix integer comparison in clock initialization

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4351 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add AES test using official test vectors.
rasky [Wed, 29 Sep 2010 13:42:20 +0000 (13:42 +0000)]
SEC: Add AES test using official test vectors.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4350 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: move the buffer alignment asserts into the appropriate functions
arighi [Wed, 29 Sep 2010 13:42:04 +0000 (13:42 +0000)]
STM32: USB: move the buffer alignment asserts into the appropriate functions

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4349 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add AES implementation.
rasky [Wed, 29 Sep 2010 13:41:58 +0000 (13:41 +0000)]
SEC: Add AES implementation.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4348 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Fix a last-minute typo.
rasky [Wed, 29 Sep 2010 13:40:29 +0000 (13:40 +0000)]
SEC: Fix a last-minute typo.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4347 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add symmetric ciphers generic interface.
rasky [Wed, 29 Sep 2010 13:38:54 +0000 (13:38 +0000)]
SEC: Add symmetric ciphers generic interface.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4346 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: fix a useless call in benchmarks.
rasky [Wed, 29 Sep 2010 13:31:22 +0000 (13:31 +0000)]
SEC: fix a useless call in benchmarks.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4345 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agocpu: enforce a memory barrier inside cpu_relax()
arighi [Wed, 29 Sep 2010 12:50:16 +0000 (12:50 +0000)]
cpu: enforce a memory barrier inside cpu_relax()

Put a memory barrier inside cpu_relax() to make sure the compiler
doesn't cache variables used outside cpu_relax() in registers.

Suppose to have the following case (used in many device drivers):

static int done = false;

void irq_handler(void)
{
done = true;
}

void wait_for_completion(void)
{
while (done == false)
cpu_relax();
}

If cpu_relax() is just considered a nop the compiler may decide to not
reload the value in the variable "done" from memory, causing a
neverending loop.

The presence of an explicit memory barrier fixes this case.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4344 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: use internal TX and RX buffer
arighi [Wed, 29 Sep 2010 12:50:13 +0000 (12:50 +0000)]
STM32: USB: use internal TX and RX buffer

The STM32 USB controller requires that the buffers used for endpoint
transfers are aligned to 4 bytes.

Define a transmit and a receive buffers internally into the low-level
USB driver, both properly aligned to 4 bytes.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4343 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: provide low-level internal TX and RX buffers
arighi [Wed, 29 Sep 2010 12:50:10 +0000 (12:50 +0000)]
USB: provide low-level internal TX and RX buffers

Some USB controllers may require specific constraints on the buffers
used for the endpoint transfers (e.g., a proper memory alignment).

Add CONFIG_USB_RXBUFSIZE and CONFIG_USB_TXBUFSIZE to the usb module
configuration parameters to define the size of these buffers.

If a low-level driver has specific memory alignment constraints it can
define such buffers internally using the proper alignment.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4342 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: added cpu_relax() in busy-wait loop.
rasky [Wed, 29 Sep 2010 12:32:42 +0000 (12:32 +0000)]
SEC: added cpu_relax() in busy-wait loop.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4341 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agosam3n port: add clock source file in wizard info for sam3n4
aleph [Wed, 29 Sep 2010 10:08:39 +0000 (10:08 +0000)]
sam3n port: add clock source file in wizard info for sam3n4

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4340 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add function to benchmark a PRNG.
rasky [Tue, 28 Sep 2010 18:36:03 +0000 (18:36 +0000)]
SEC: add function to benchmark a PRNG.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4339 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add LM3S backend for entropy pulling.
rasky [Tue, 28 Sep 2010 18:35:35 +0000 (18:35 +0000)]
SEC: Add LM3S backend for entropy pulling.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4338 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add missing copyright header.
rasky [Tue, 28 Sep 2010 18:34:30 +0000 (18:34 +0000)]
SEC: Add missing copyright header.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4337 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add high-level interface for secure random numbers generation.
rasky [Tue, 28 Sep 2010 18:32:43 +0000 (18:32 +0000)]
SEC: Add high-level interface for secure random numbers generation.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4336 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add generic interface for entropy pools.
rasky [Tue, 28 Sep 2010 18:03:16 +0000 (18:03 +0000)]
SEC: add generic interface for entropy pools.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4335 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add missing include
rasky [Tue, 28 Sep 2010 18:00:55 +0000 (18:00 +0000)]
SEC: add missing include

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4334 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add ISAAC PRNG implementation
rasky [Tue, 28 Sep 2010 18:00:42 +0000 (18:00 +0000)]
SEC: Add ISAAC PRNG implementation

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4333 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add generic interface for PRNGs.
rasky [Tue, 28 Sep 2010 17:52:11 +0000 (17:52 +0000)]
SEC: add generic interface for PRNGs.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4332 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix CPU names as suggested by Francesco.
rasky [Tue, 28 Sep 2010 15:38:00 +0000 (15:38 +0000)]
Fix CPU names as suggested by Francesco.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4331 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agosam3n port: add code to setup system clock
aleph [Tue, 28 Sep 2010 15:37:57 +0000 (15:37 +0000)]
sam3n port: add code to setup system clock

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4330 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUpdate cpu description for stm32 and lm3s.
asterix [Tue, 28 Sep 2010 13:33:48 +0000 (13:33 +0000)]
Update cpu description for stm32 and lm3s.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4329 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRemove timer dependece.
asterix [Tue, 28 Sep 2010 10:59:34 +0000 (10:59 +0000)]
Remove timer dependece.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4328 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoComplete adc support for lm3s family.
asterix [Tue, 28 Sep 2010 10:58:58 +0000 (10:58 +0000)]
Complete adc support for lm3s family.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4327 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd adc module for lm3s family.
asterix [Tue, 28 Sep 2010 10:57:59 +0000 (10:57 +0000)]
Add adc module for lm3s family.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4326 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoClean up.
asterix [Tue, 28 Sep 2010 10:56:50 +0000 (10:56 +0000)]
Clean up.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4325 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoWait the acquisition ends.
asterix [Tue, 28 Sep 2010 10:39:29 +0000 (10:39 +0000)]
Wait the acquisition ends.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4324 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix definition for lm3s8962.
asterix [Tue, 28 Sep 2010 08:46:53 +0000 (08:46 +0000)]
Fix definition for lm3s8962.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4323 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix typos.
asterix [Tue, 28 Sep 2010 08:31:27 +0000 (08:31 +0000)]
Fix typos.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4322 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd conversion formula for internal temperature sensor. Use macros istead BV.
asterix [Tue, 28 Sep 2010 08:16:43 +0000 (08:16 +0000)]
Add conversion formula for internal temperature sensor. Use macros istead BV.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4321 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd first adc implementation module for lm3s.
asterix [Tue, 28 Sep 2010 07:56:57 +0000 (07:56 +0000)]
Add first adc implementation module for lm3s.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4320 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoChange tooltip generation. Now tooltip includes: the macro name and, if exists,
duplo [Tue, 28 Sep 2010 07:49:13 +0000 (07:49 +0000)]
Change tooltip generation. Now tooltip includes: the macro name and, if exists,
the verbose description. (bug #161)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4319 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRemove unneeded setting.
asterix [Mon, 27 Sep 2010 17:26:50 +0000 (17:26 +0000)]
Remove unneeded setting.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4318 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd stand alone module for read internal sensor temperature for ek-lm3s1968 board.
asterix [Mon, 27 Sep 2010 17:20:33 +0000 (17:20 +0000)]
Add stand alone module for read internal sensor temperature for ek-lm3s1968 board.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4317 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd reg definition for adc driver.
asterix [Mon, 27 Sep 2010 17:19:36 +0000 (17:19 +0000)]
Add reg definition for adc driver.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4316 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRestore pipefail.
batt [Mon, 27 Sep 2010 13:34:08 +0000 (13:34 +0000)]
Restore pipefail.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4315 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRestore separate logs; cat errors to stdout.
batt [Mon, 27 Sep 2010 13:09:14 +0000 (13:09 +0000)]
Restore separate logs; cat errors to stdout.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4314 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRemove unused tee logs.
batt [Mon, 27 Sep 2010 12:05:05 +0000 (12:05 +0000)]
Remove unused tee logs.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4313 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSilent warning when we compile without debug.
asterix [Mon, 27 Sep 2010 12:04:52 +0000 (12:04 +0000)]
Silent warning when we compile without debug.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4312 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd cfg for flash module.
asterix [Mon, 27 Sep 2010 12:03:58 +0000 (12:03 +0000)]
Add cfg for flash module.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4311 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd return value for failed tests.
batt [Mon, 27 Sep 2010 10:44:50 +0000 (10:44 +0000)]
Add return value for failed tests.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4310 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: endpoint buffer must be 4-bytes aligned
arighi [Mon, 27 Sep 2010 09:35:22 +0000 (09:35 +0000)]
STM32: USB: endpoint buffer must be 4-bytes aligned

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4309 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add RIPEMD-160 hash algorithm
rasky [Fri, 24 Sep 2010 17:08:55 +0000 (17:08 +0000)]
SEC: add RIPEMD-160 hash algorithm

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4308 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add some documentation to the interface.
rasky [Fri, 24 Sep 2010 17:08:18 +0000 (17:08 +0000)]
SEC: add some documentation to the interface.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4307 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add utilities module.
rasky [Fri, 24 Sep 2010 16:26:32 +0000 (16:26 +0000)]
SEC: Add utilities module.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4306 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add implementations for PBKDF1 and PBKDF2.
rasky [Fri, 24 Sep 2010 16:23:28 +0000 (16:23 +0000)]
SEC: add implementations for PBKDF1 and PBKDF2.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4305 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add generic interface for key-derivation functions.
rasky [Fri, 24 Sep 2010 16:23:12 +0000 (16:23 +0000)]
SEC: add generic interface for key-derivation functions.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4304 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: implement stackinit() functions to simplify initialization and composition of...
rasky [Fri, 24 Sep 2010 15:15:31 +0000 (15:15 +0000)]
SEC: implement stackinit() functions to simplify initialization and composition of algorithms.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4303 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add HMAC implementation.
rasky [Fri, 24 Sep 2010 13:56:42 +0000 (13:56 +0000)]
SEC: add HMAC implementation.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4302 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add interface for message authentication codes.
rasky [Fri, 24 Sep 2010 13:56:31 +0000 (13:56 +0000)]
SEC: add interface for message authentication codes.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4301 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Fix digest len and block len reported by algorithms.
rasky [Fri, 24 Sep 2010 13:55:50 +0000 (13:55 +0000)]
SEC: Fix digest len and block len reported by algorithms.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4300 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd followlinks=True when calling os.walk (attempt to fix #169).
duplo [Fri, 24 Sep 2010 13:12:02 +0000 (13:12 +0000)]
Add followlinks=True when calling os.walk (attempt to fix #169).

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4299 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: add MD5 implementation.
rasky [Fri, 24 Sep 2010 13:08:57 +0000 (13:08 +0000)]
SEC: add MD5 implementation.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4298 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: move SHA-1 benchmark into generic file.
rasky [Fri, 24 Sep 2010 13:08:47 +0000 (13:08 +0000)]
SEC: move SHA-1 benchmark into generic file.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4297 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agocountof(): use STATIC_ASSERT_EXPR() to perform compile-time type checking
arighi [Fri, 24 Sep 2010 13:00:47 +0000 (13:00 +0000)]
countof(): use STATIC_ASSERT_EXPR() to perform compile-time type checking

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4296 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoDirectories with gcc-binary-like name are now excluded from toolchain list :)
duplo [Fri, 24 Sep 2010 12:42:28 +0000 (12:42 +0000)]
Directories with gcc-binary-like name are now excluded from toolchain list :)
(Bug #172)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4295 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: rename usb_serial module in usbser
arighi [Fri, 24 Sep 2010 12:41:51 +0000 (12:41 +0000)]
USB: rename usb_serial module in usbser

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4294 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: rename usb_mouse module in usbmouse
arighi [Fri, 24 Sep 2010 12:41:47 +0000 (12:41 +0000)]
USB: rename usb_mouse module in usbmouse

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4293 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: rename usb_keyboard module in usbkbd
arighi [Fri, 24 Sep 2010 12:41:42 +0000 (12:41 +0000)]
USB: rename usb_keyboard module in usbkbd

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4292 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd modified label in "toolchain search page" (#171).
duplo [Fri, 24 Sep 2010 12:29:58 +0000 (12:29 +0000)]
Add modified label in "toolchain search page" (#171).

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4291 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: use proper stack variables instead of a global state.
rasky [Fri, 24 Sep 2010 12:25:54 +0000 (12:25 +0000)]
SEC: use proper stack variables instead of a global state.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4290 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoCPU: optimize generic SWAB32 implementation, and prefer it over builtin for Cortex-M3
rasky [Fri, 24 Sep 2010 11:04:16 +0000 (11:04 +0000)]
CPU: optimize generic SWAB32 implementation, and prefer it over builtin for Cortex-M3

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4289 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix #173. Now the toolchains are ordered such below:
duplo [Fri, 24 Sep 2010 10:43:29 +0000 (10:43 +0000)]
Fix #173. Now the toolchains are ordered such below:
 * valid toolchains (recognized by the Wizard and with the right target)
 * non-valid toolchains (recognized by the Wizard but with the wrong target)
 * unknown toolchains (not recognized by the Wizard)
 * non-validated toolchains

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4288 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: coding style fixes
arighi [Fri, 24 Sep 2010 10:36:33 +0000 (10:36 +0000)]
USB: coding style fixes

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4287 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: coding style fixes
arighi [Fri, 24 Sep 2010 10:32:28 +0000 (10:32 +0000)]
STM32: USB: coding style fixes

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4286 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd SHA-1 unrolled implementation (optimized for 32-bit processors)
rasky [Fri, 24 Sep 2010 09:50:27 +0000 (09:50 +0000)]
Add SHA-1 unrolled implementation (optimized for 32-bit processors)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4285 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: Add hash function interface
rasky [Fri, 24 Sep 2010 09:50:10 +0000 (09:50 +0000)]
SEC: Add hash function interface

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4284 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: create main directory
rasky [Fri, 24 Sep 2010 09:49:33 +0000 (09:49 +0000)]
SEC: create main directory

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4283 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoCPU: byte order help function refactoring #2
arighi [Fri, 24 Sep 2010 09:36:16 +0000 (09:36 +0000)]
CPU: byte order help function refactoring #2

 - fix: rename swab16() to SWAB16() (this fixes a build error in
   bertos/net/pocketbus.c as reported by the nightly build test)

 - fix: all the new macros now return the same data type of the input

 - add type checking also to SWAB*() functions using
   STATIC_ASSERT_EXPR()

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4282 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSEC: temporary exclude sec directory from nightly compilation tests,
rasky [Fri, 24 Sep 2010 09:31:11 +0000 (09:31 +0000)]
SEC: temporary exclude sec directory from nightly compilation tests,
as code there might be broken at any time.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4281 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoAdd CPU_CORE_NAME and CPU_NAME macros for debugging purposes.
rasky [Thu, 23 Sep 2010 17:33:26 +0000 (17:33 +0000)]
Add CPU_CORE_NAME and CPU_NAME macros for debugging purposes.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4280 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: make use of standard byte order functions
arighi [Thu, 23 Sep 2010 17:30:11 +0000 (17:30 +0000)]
USB: make use of standard byte order functions

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4279 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoCPU: byte order helper functions refactoring
arighi [Thu, 23 Sep 2010 17:30:08 +0000 (17:30 +0000)]
CPU: byte order helper functions refactoring

Define all the cpu_to_*/*_to_cpu() functions as macro and make use of
__builtin_bswap*() gcc functions when possible.

This allows to use the byteorder helper functions as constant
initializers.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4278 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoIntroduce STATIC_ASSERT_EXPR()
arighi [Thu, 23 Sep 2010 17:30:05 +0000 (17:30 +0000)]
Introduce STATIC_ASSERT_EXPR()

STATIC_ASSERT_EXPR() can be used to trigger compile time errors inside a
C expression.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4277 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: coding style fixes (function naming)
arighi [Thu, 23 Sep 2010 17:12:36 +0000 (17:12 +0000)]
USB: coding style fixes (function naming)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4276 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: coding style fixes (structure naming)
arighi [Thu, 23 Sep 2010 17:12:31 +0000 (17:12 +0000)]
USB: coding style fixes (structure naming)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4275 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRevert latest modifications :(
duplo [Thu, 23 Sep 2010 15:24:54 +0000 (15:24 +0000)]
Revert latest modifications :(

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4274 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoOrder the toolchains:
duplo [Thu, 23 Sep 2010 14:26:43 +0000 (14:26 +0000)]
Order the toolchains:
 * valid toolchains
 * valid toolchains but for different targets
 * non-valid toolchains

This is an attempt to fix #173...

NOTE: these lines are not yet tested with more than one toolchain...

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4273 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix #170. Now, the first time you arrive at Board Page, the Wizard
duplo [Thu, 23 Sep 2010 12:29:34 +0000 (12:29 +0000)]
Fix #170. Now, the first time you arrive at Board Page, the Wizard
automatically select the first one.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4272 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix #160.
duplo [Thu, 23 Sep 2010 10:54:29 +0000 (10:54 +0000)]
Fix #160.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4271 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32-P103: implement WAKEUP button driver
arighi [Thu, 23 Sep 2010 10:38:14 +0000 (10:38 +0000)]
STM32-P103: implement WAKEUP button driver

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4270 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agousb-keyboard: acknowledge HID_REQ_SET_REPORT to the host
arighi [Thu, 23 Sep 2010 10:24:23 +0000 (10:24 +0000)]
usb-keyboard: acknowledge HID_REQ_SET_REPORT to the host

This fixes the following connection timeout errors on Linux when reading
the USB device details via lsusb -v:

  cannot read device status, Connection timed out (110)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4269 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: device, interface and endpoint status is always uint16_t
arighi [Thu, 23 Sep 2010 10:24:21 +0000 (10:24 +0000)]
STM32: USB: device, interface and endpoint status is always uint16_t

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4268 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agousb-keyboard: remove duplicate "end collection" marker from the report descriptor
arighi [Thu, 23 Sep 2010 10:24:18 +0000 (10:24 +0000)]
usb-keyboard: remove duplicate "end collection" marker from the report descriptor

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4267 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoRemove rcc dependency. Use pyrcc4 instead, to generate the 'bertos_rc.py'
duplo [Thu, 23 Sep 2010 10:03:26 +0000 (10:03 +0000)]
Remove rcc dependency. Use pyrcc4 instead, to generate the 'bertos_rc.py'
python module, containing the resources.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4266 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: always check host expected size
arighi [Thu, 23 Sep 2010 08:45:27 +0000 (08:45 +0000)]
STM32: USB: always check host expected size

Always check the host expected size before sending device, interface or
endpoint status and properly set zero-packet flag when the size of the
packet to transmit is less than the host expected size.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4265 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: add generic usb-keyboard device driver (EXPERIMENTAL)
arighi [Wed, 22 Sep 2010 16:57:39 +0000 (16:57 +0000)]
USB: add generic usb-keyboard device driver (EXPERIMENTAL)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4264 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agousb-mouse: do not set bDeviceClass in the device descriptor
arighi [Wed, 22 Sep 2010 16:57:36 +0000 (16:57 +0000)]
usb-mouse: do not set bDeviceClass in the device descriptor

Do not explicitly set the bDeviceClass attribute to USB_CLASS_HID for
usb-mouse device. Even if this would be compliant with USB standards,
some OSes (e.g., Mac OS X) don't properly recognize the device as a
valid USB mouse.

Setting the value to 0 fixes the problem.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4263 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agousb-mouse: fix wrong copy/paste comment
arighi [Wed, 22 Sep 2010 16:57:34 +0000 (16:57 +0000)]
usb-mouse: fix wrong copy/paste comment

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4262 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: add generic usb-mouse device driver (EXPERIMENTAL)
arighi [Wed, 22 Sep 2010 10:49:14 +0000 (10:49 +0000)]
USB: add generic usb-mouse device driver (EXPERIMENTAL)

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4261 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoUSB: make all the read-only descriptors as const
arighi [Wed, 22 Sep 2010 10:18:43 +0000 (10:18 +0000)]
USB: make all the read-only descriptors as const

NOTE: at the moment only usb_device_descriptor_t can't be made const,
because the attribute bMaxPacketSize0 is automatically filled by the
low-level driver at runtime.

TODO: refactor this part to evaluate bMaxPacketSize0 at compile time and
make usb_device_descriptor_t read-only as well.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4260 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: support extended descriptors under a USB interface
arighi [Wed, 22 Sep 2010 10:18:39 +0000 (10:18 +0000)]
STM32: USB: support extended descriptors under a USB interface

Do not assume that there are only endpoint descriptors under an
interface descriptor. There can be other specific USB descriptors before
the list of used endpoints (i.e., usb-hid requires that the HID
descriptor is placed just after the interface descriptor and before the
list of endpoint descriptors).

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4259 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: wLength field of the setup packet is in little-endian format
arighi [Wed, 22 Sep 2010 10:18:36 +0000 (10:18 +0000)]
STM32: USB: wLength field of the setup packet is in little-endian format

This is not really necessary for this architecture, but use
usb_cpu_to_le16() just for code readability.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4258 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: reduce logging verbosity
arighi [Wed, 22 Sep 2010 10:18:34 +0000 (10:18 +0000)]
STM32: USB: reduce logging verbosity

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4257 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: support EP0 read/write operations via standard interface
arighi [Wed, 22 Sep 2010 10:18:31 +0000 (10:18 +0000)]
STM32: USB: support EP0 read/write operations via standard interface

Allow to submit EP0 read/write requests using the standard interface
usb_ep_read/write().

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4256 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: always perform non-blocking I/O for EP0
arighi [Wed, 22 Sep 2010 10:18:29 +0000 (10:18 +0000)]
STM32: USB: always perform non-blocking I/O for EP0

Control endpoint I/O can happen under IRQ context, so we should never
sleep.

Change the behaviour of usb_ep_read/write() to never sleep if the
operation is performed by the control endpoint (EP0).

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4255 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoFix some pastos
aleph [Tue, 21 Sep 2010 17:23:28 +0000 (17:23 +0000)]
Fix some pastos

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4254 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agoSTM32: USB: properly catch device's GET_DESCRIPTOR requests
arighi [Tue, 21 Sep 2010 10:37:55 +0000 (10:37 +0000)]
STM32: USB: properly catch device's GET_DESCRIPTOR requests

Getting descriptor for a device is a standard request (e.g., USB HID
requires this). So, be sure to call the device's event handler when this
request occurs.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4253 38d2e660-2303-0410-9eaa-f027e97ec537

14 years agousb-serial: fix comment
arighi [Tue, 21 Sep 2010 10:37:52 +0000 (10:37 +0000)]
usb-serial: fix comment

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4252 38d2e660-2303-0410-9eaa-f027e97ec537