zephyr/samples/drivers/random
Erwin Rol 3ff4d7409f samples: random: Add sentinel to check for buffer overflows
Initialize the buffer to 0 and read one byte less than the
buffer size. The result should be that the last byte of
the buffer always stays 0. This way it is possible to verify
it the driver does not write outside the buffer.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-07 07:27:39 -05:00
..
src samples: random: Add sentinel to check for buffer overflows 2017-07-07 07:27:39 -05:00
Makefile samples: Add random driver sample. 2016-12-24 16:40:11 +00:00
prj.conf samples: Add random driver sample. 2016-12-24 16:40:11 +00:00
README.txt samples: Add random driver sample. 2016-12-24 16:40:11 +00:00
sample.yaml tests: samples: convert testcase files to yaml 2017-06-21 20:56:53 -04:00

Title: Random

Description:

A simple random number generation example

--------------------------------------------------------------------------------

Building and Running Project:

This project writes an infinite series of random numbers to the
console, 10 per second.

It can be built and executed on frdm_k64f as follows:

    make

Sample Output:

Random Example! arm
random device is 0x2000008c, name is RANDOM_0
  0xd7  0x42  0xb0  0x7b  0x56  0x3b  0xc3  0x43  0x8a  0xa3
  0xfa  0xec  0xd8  0xc3  0x36  0xf8  0x7b  0x82  0x2b  0x39