Skip to content

Commit

Permalink
Little updates for 1.0.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakKemble committed Dec 30, 2016
1 parent 021bcd5 commit 54b04e4
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 16 deletions.
6 changes: 6 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2016-12-30 (v1.0.4):
- Added full support for reading and writing the clock reference output, thanks to MDenzinger

0000-00-00 (v1.0.3):
- Messed up the tag names on GitHub and put 1.0.3 instead of 1.0.2, so we're skipping v1.0.3 here

2016-02-24 (v1.0.2):
- Changed MCP2221_GPIO_MODE_ALT numbering to match the datasheet (1-3 instead of 0-2)

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ This library also makes use of [HIDAPI](http://www.signal11.us/oss/hidapi/).
| Flash password protection | Not yet implemented
| C++ and C# wrappers | Not yet implemented

*Reading clock out duty cycle is not documented in the datasheet, but the Microchip library seems to support it.

## Documentation
[Doxygen pages](http://zkemble.github.io/libmcp2221/)

Expand All @@ -37,7 +35,7 @@ Hint:
### Using pre-built binaries
- Copy `libmcp2221.h` to your compilers include directory (`/usr/include/` on Linux)
- Windows: Copy `./lib/win/libmcp2221.dll` to your compilers lib directory. Each program that uses libmcp2221 will need a copy of `libmcp2221.dll` in the same directory.
- Linux: Copy `./lib/unix/libmcp2221.so` and `./lib/unix/libmcp2221.a` to `/usr/lib/` (these were compiled on Debian 8.1 x64 using the HIDRAW version of HIDAPI)
- Linux: Copy `./lib/unix/libmcp2221.so` and `./lib/unix/libmcp2221.a` to `/usr/lib/` (these were compiled on Debian 8.4 x64 using the HIDRAW version of HIDAPI)

### Compiling
- Download hid.c for your OS from https://github.com/signal11/hidapi ([Windows](https://raw.githubusercontent.com/signal11/hidapi/master/windows/hid.c) | [Linux (HIDRAW)](https://raw.githubusercontent.com/signal11/hidapi/master/linux/hid.c) | [Linux (LibUSB - this doesn't seem to work at the moment)](https://raw.githubusercontent.com/signal11/hidapi/master/libusb/hid.c) | [Mac](https://raw.githubusercontent.com/signal11/hidapi/master/mac/hid.c)) and [hidapi.h](https://raw.githubusercontent.com/signal11/hidapi/master/hidapi/hidapi.h)
Expand Down
8 changes: 4 additions & 4 deletions lib/libmcp2221.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ mcp2221_gpioconfset_t mcp2221_GPIOConfInit(void);
* @brief Set the clock reference output divider and duty cycle (SRAM)
*
* @param [device] Device to operate on
* @param [div] Frequency divider from 12MHz
* @param [div] Frequency divider from 48MHz
* @param [duty] Duty cycle
* @return ::mcp2221_error error code
*/
Expand Down Expand Up @@ -602,7 +602,7 @@ mcp2221_error mcp2221_savePolarity(mcp2221_t* device, mcp2221_dedipin_t pin, int
* @brief Save clock reference output settings to flash
*
* @param [device] Device to operate on
* @param [div] Frequency divider from 12MHz
* @param [div] Frequency divider from 48MHz
* @param [duty] Duty cycle
* @return ::mcp2221_error error code
*/
Expand Down Expand Up @@ -732,8 +732,8 @@ mcp2221_error mcp2221_loadPolarity(mcp2221_t* device, mcp2221_dedipin_t pin, int
* @brief Read clock output settings from flash
*
* @param [device] Device to operate on
* @param [div]
* @param [duty]
* @param [div] Pointer to ::mcp2221_clkdiv_t variable where value will be placed
* @param [duty] Pointer to ::mcp2221_clkduty_t variable where value will be placed
* @return ::mcp2221_error error code
*/
mcp2221_error mcp2221_loadClockOut(mcp2221_t* device, mcp2221_clkdiv_t* div, mcp2221_clkduty_t* duty);
Expand Down
Binary file modified lib/unix/libmcp2221.a
Binary file not shown.
Binary file modified lib/unix/libmcp2221.so
Binary file not shown.
Binary file modified lib/win/libmcp2221.a
Binary file not shown.
Binary file modified lib/win/libmcp2221.dll
Binary file not shown.
6 changes: 4 additions & 2 deletions libmcp2221/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ ifeq ($(OS),Windows_NT)
SOURCES += win/resource.rc
LDLIBS += -lsetupapi
EXECUTABLE=$(PROJECT).dll
NULLOUT=nul
else
# udev is for the HIDRAW version of HIDAPI and usb-1.0 is for the libusb version
LDLIBS += -ludev -lusb-1.0
EXECUTABLE=$(PROJECT).so
NULLOUT=/dev/null
endif

ARCHIVE=$(PROJECT).a
Expand Down Expand Up @@ -77,7 +79,7 @@ clean:
rm -rf $(OBJ_DIR)/*.o $(BIN_DIR)/$(EXECUTABLE) $(BIN_DIR)/$(ARCHIVE)

dirs:
mkdir $(BIN_DIR) 2>nul || true
mkdir $(OBJ_DIR) 2>nul || true
mkdir $(BIN_DIR) 2>$(NULLOUT) || true
mkdir $(OBJ_DIR) 2>$(NULLOUT) || true

.PHONY: clean all
8 changes: 4 additions & 4 deletions libmcp2221/libmcp2221.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ mcp2221_gpioconfset_t mcp2221_GPIOConfInit(void);
* @brief Set the clock reference output divider and duty cycle (SRAM)
*
* @param [device] Device to operate on
* @param [div] Frequency divider from 12MHz
* @param [div] Frequency divider from 48MHz
* @param [duty] Duty cycle
* @return ::mcp2221_error error code
*/
Expand Down Expand Up @@ -602,7 +602,7 @@ mcp2221_error mcp2221_savePolarity(mcp2221_t* device, mcp2221_dedipin_t pin, int
* @brief Save clock reference output settings to flash
*
* @param [device] Device to operate on
* @param [div] Frequency divider from 12MHz
* @param [div] Frequency divider from 48MHz
* @param [duty] Duty cycle
* @return ::mcp2221_error error code
*/
Expand Down Expand Up @@ -732,8 +732,8 @@ mcp2221_error mcp2221_loadPolarity(mcp2221_t* device, mcp2221_dedipin_t pin, int
* @brief Read clock output settings from flash
*
* @param [device] Device to operate on
* @param [div]
* @param [duty]
* @param [div] Pointer to ::mcp2221_clkdiv_t variable where value will be placed
* @param [duty] Pointer to ::mcp2221_clkduty_t variable where value will be placed
* @return ::mcp2221_error error code
*/
mcp2221_error mcp2221_loadClockOut(mcp2221_t* device, mcp2221_clkdiv_t* div, mcp2221_clkduty_t* duty);
Expand Down
2 changes: 1 addition & 1 deletion libmcp2221/win/libmcp2221.dll.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
version="1.0.4.0"
processorArchitecture="*"
name="zakkemble.MCP2221"
type="win32"
Expand Down
4 changes: 2 additions & 2 deletions libmcp2221/win/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#define APPNAME "MCP2221 Lib"
#define APPNAME_TERM "MCP2221 Lib\0"
#define APPVERSION 1,0,0,0
#define APPVERSION_STR "1.0.0.0\0"
#define APPVERSION 1,0,4,0
#define APPVERSION_STR "1.0.4.0\0"
#define APPCOMPANY "zakkemble.co.uk\0"
#define APPCOPYRIGHT "(c) Zak Kemble 2015\0"

Expand Down

0 comments on commit 54b04e4

Please sign in to comment.