Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Conversation

@MrSurly
Copy link
Contributor

@MrSurly MrSurly commented Apr 3, 2017

esp32/Makefile: Added hw spi object files
esp32/mpconfigport: Updated for hw spi
esp32/machine_hw_spi.c: New source file for hw SPI
esp32/machine_hw_spi.h: New source file for hw SPI

Squashed commit of the following:

commit 43ae202
Author: Eric Poulsen eric@zyxod.com
Date: Mon Apr 3 12:57:25 2017 -0700

esp32/README.md: merged with upstream

commit 57ce050
Author: Eric Poulsen eric@zyxod.com
Date: Mon Apr 3 12:44:50 2017 -0700

esp32/mahine_hw.*: copyright, reorg, now de-init resets pins to GPIO

commit 624a23c
Author: Eric Poulsen eric@zyxod.com
Date: Mon Apr 3 10:29:41 2017 -0700

esp32/Makefile: reverted FLASH_MODE to qio

commit c6af5a7
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 12:12:20 2017 -0700

esp32/machine_hw_spi.*: Updated to make spi_obj.init(...) idiom work

commit d0c792c
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 12:11:53 2017 -0700

esp32/Makefile: removed redundant object files

commit d3ecc01
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 12:10:54 2017 -0700

extmod/machine_spi.c: reverted

commit 28cfb89
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 11:03:50 2017 -0700

esp32/machine_hw_spi.*: temporary delete to fix merging

commit 92129b5
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 11:01:17 2017 -0700

esp32/Makefile: updates for hw spi

commit c046e4f
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 10:55:51 2017 -0700

esp32/machine_hw_spi.*: Renamed internals from hspi --> hw_spi

commit e0609a4
Author: Eric Poulsen eric@zyxod.com
Date: Fri Mar 31 07:45:47 2017 -0700

esp32/machine_hspi.*: Renamed to machine_hw_spi.*

commit 192a032
Author: Eric Poulsen eric@zyxod.com
Date: Thu Mar 30 14:55:12 2017 -0700

esp32/machine_hspi.c: Adding HW SPI support
esp32/machine_hspi.h: Adding HW SPI support

commit f41a01a
Author: Eric Poulsen eric@zyxod.com
Date: Thu Mar 30 14:54:31 2017 -0700

esp32/mpconfigport.h: Added support for HSPI

commit 0ec1d9e
Author: Eric Poulsen eric@zyxod.com
Date: Mon Mar 27 10:09:10 2017 -0700

esp32/README.md Added troubleshooting section to the end

@MrSurly MrSurly mentioned this pull request Apr 3, 2017
@dpgeorge
Copy link
Member

dpgeorge commented Apr 4, 2017

I tried it and it worked for me, except I couldn't change the baudrate once it was already initialised, but I guess that's a bug in the IDF.

A few comments re the code:

  • move the typedef of the machine_hw_spi_obj_t struct from machine_hw_spi.h to machine_hw_spi.c (for type privacy)
  • remove machine_hw_spi.h completely and put anything remaining in it into modmachine.h
  • error message strings should start with a lower case letter
  • remove trailing whitespace on lines
  • make sure there is one space after the if/while/for keyword

Thanks!

@MrSurly MrSurly closed this Apr 4, 2017
@MrSurly
Copy link
Contributor Author

MrSurly commented Apr 4, 2017

I realized I screwed up by merging my branch back into esp32 prematurely.

I'm going to close this, fix up my branch w/ your recommendations, and re-submit a PR from that branch.

@MrSurly
Copy link
Contributor Author

MrSurly commented Apr 4, 2017

error message strings should start with a lower case letter

Didn't understand this one ... You mean the actual error message?

@dpgeorge
Copy link
Member

dpgeorge commented Apr 4, 2017

You mean the actual error message?

Yes, eg "peripheral already in use" (not "Peripheral already in use", unless the first word is an acronym, eg SPI).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants