From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Tue, 29 Dec 2015 10:55:30 +0000 In-Reply-To: <1211924935.3518360.1451362224733.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Pi updates Topicbox-Message-UUID: 7b2913a2-ead9-11e9-9d60-3106f5b1d025 Thanks, Brian - that all looks very useful to make the pi more amenable to hardware tinkering. One small suggested amendment: your spiclock() says this - /* * According the Broadcom docs, the divisor has to * be a power of 2. This code rounds up so that the * resulting clock is the highest value no greater than * what's requested. */ but http://raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md has an erratum suggesting "power of 2" should be "multiple of 2". I have been using a default divisor of 250 for a 1MHz clock, and that's the frequency I see on my oscilloscope.