Added LIS3DSH demo example#101
Added LIS3DSH demo example#101marcorussi wants to merge 3 commits intolibopencm3:masterfrom marcorussi:master
Conversation
There was a problem hiding this comment.
these are only used once, it seems more appropriate (to me at least) to put this sort of thing inside your functions for communicating with the device, rather than separating them out here. Try and refrain from macros for the sake of it, the compiler is generally very good at inlining things where suitable.
|
ah, damnit, I had some more here. please run "make stylecheck" at least against your own submission here please. It's also generally considered nicer to use a common prefix for all the register addresses for a peripheral, not multiple prefixes. I've not looked at this in any real detail though yet. |
|
Hi, regarding the macros, I separated them outside for legibility reasons and to allow people to use them in their own projects where maybe they need to call them several times. |
|
Regarding to stylecheck, I'm going to fix all the resulting issues. Thanks |
|
Hi, I fixed all coding style issues but there 6 which I don't understand what is the problem. Can you please help? Thanks. |
|
Hi, I fixed the remaining style code issues. It should be fine now. Please let me know. Thanks ;) |
|
Hi, is there any problem to merge this request? Thanks. |
|
nothing obvious, mostly just time a the moment. It's still in the queue :) |
|
Ah Ok, I understand :) . No prob, I just needed to know if I had to change anything. I'll wait for this, Thanks. |
|
hey , i search the PCB of LIS3DSH ... do you have a article from This compenent |
|
Hi, after copying the proyect folder in the same folder where libopencm3 is located, I run make , and there is no problem, but when I run make flash I get this error : FLASH LIS3DSH_demo.hex I'm new at this, could you help me? |
|
Hi, is there any other error description? Marco. On 9 November 2016 at 21:46, chrisyeung333 notifications@github.com wrote:
|
|
I am running ubuntu 14.04, i have been able to flash the STM32F4 before with another code through the console. |
|
OK, open the makefile and be sure that make flash command is compatible On 9 November 2016 at 22:35, chrisyeung333 notifications@github.com wrote:
|
|
make V=1 will show the command line used too. |
|
Hi again, sorry for replying so late, I have been very busy, I really appreciate your help. /* ---------------- Local Macros ----------------- */ /* set read single command. Attention: command must be 0x3F at most / This is my flash.sh file this is my makefile `BINARY = main SOURCES = LIBNAME = opencm3_stm32f4 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 include ../common/Makefile.rules` Thank You |
|
Hello, |
Hi,
please consider to add a simple demo example of the LIS3DSH accelerometer for STM32F4 Discovery board.
Instructions and demo behaviour could be found in the README file.
Thanks.